Skip to content

Commit

Permalink
Feature/ci release (#47)
Browse files Browse the repository at this point in the history
* + Add script release tag

* + Add script release tag

* + Add script release tag

* + Add script release tag

* + Add script release tag

* + Add script release tag
  • Loading branch information
iletai authored Mar 22, 2024
1 parent fcf8f32 commit 0e44003
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release Tag

on:
workflow_dispatch:
inputs:
tagname:
description: 'The name of the tag to create'
required: true

jobs:
create_tag:
if: ${{ github.event.action == 'workflow_dispatch' }}
runs-on: macos-latest
timeout-minutes: 25
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create tag
uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ github.event.inputs.tagname }}',
sha: context.sha
})
- name: Build executable for release
run: swift build -c release --arch arm64 --arch x86_64 --product SwiftUICalendarView

- name: Compress archive
run: tar -czf ${{ github.event.inputs.tagname }}.tar.gz -C .build/apple/Products/Release SwiftUICalendarView

- name: Release
uses: softprops/action-gh-release@v2
with:
files: ${{ github.event.inputs.tagname }}.tar.gz
token: ${{ secrets.GH_TOKEN }}

0 comments on commit 0e44003

Please sign in to comment.