Skip to content

Commit 71c8b9e

Browse files
authored
Merge pull request #1 from ticky/workflow
Add GitHub Workflow
2 parents 9b996ab + 72eae6b commit 71c8b9e

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/applescript.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: AppleScript
2+
3+
on:
4+
push:
5+
branches: [ $default-branch ]
6+
tags:
7+
- v*
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
13+
runs-on: macos-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Build
20+
run: ./build.sh
21+
22+
- name: Zip
23+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'v') }}
24+
run: zip -r "Switch Capture Tagger.zip" *.app Readme.md
25+
26+
- name: Create Release
27+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'v') }}
28+
id: create_release
29+
uses: actions/create-release@v1
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
with:
33+
tag_name: ${{ github.ref }}
34+
release_name: Switch Capture Tagger ${{ github.ref }}
35+
draft: false
36+
prerelease: false
37+
38+
- name: Upload Application release
39+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'v') }}
40+
id: upload_application
41+
uses: actions/upload-release-asset@v1
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
with:
45+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
46+
asset_path: ./Switch Capture Tagger.zip
47+
asset_name: "Switch Capture Tagger ${{ github.ref }}.zip"
48+
asset_content_type: application/zip

0 commit comments

Comments
 (0)