1- name : Build and Attache Apps
1+ name : Build and Attach Apps
22on :
33 release :
44 types : [created]
55 workflow_dispatch :
66
7+ permissions :
8+ contents : write
9+
710jobs :
811 build-macOS-app-apple-silicon :
912 runs-on : macos-latest
1013 steps :
11- - name : Print the branch currently working on
12- run : echo "BRANCH_NAME =${{ matrix.branch-name }}"
14+ - name : Print ref and SHA
15+ run : echo "REF =${{ github.ref_name }} SHA=${{ github.sha }}"
1316 - name : Check out the branch
14- uses : actions/checkout@v2
17+ uses : actions/checkout@v4
1518 with :
1619 submodules : true
1720
1821 - name : Set up Python
19- uses : actions/setup-python@v2
22+ uses : actions/setup-python@v5
2023 with :
21- python-version : ' 3.9'
24+ python-version : " 3.9"
2225
2326 - name : Install dependencies
2427 run : |
3134 mkdir -p dist
3235 zip -r dist/cat-relay-src.zip .
3336
34- - name : Attache source code to release
37+ - name : Attach source code to release
38+ if : github.event_name == 'release'
3539 uses : actions/upload-release-asset@v1
3640 with :
3741 upload_url : ${{ github.event.release.upload_url }}
4347
4448 - name : Build macOS App - Apple Silicon
4549 env :
46- ARCHFLAGS : " -arch arm64" # Apple Silicon
50+ ARCHFLAGS : " -arch arm64" # Apple Silicon
4751 run : |
4852 pyinstaller app.py --name CatRelay --windowed --distpath dist/mac-arm
4953
5357 zip -r ../cat-relay-mac-arm.zip CatRelay.app
5458 shell : bash
5559
56- - name : Attache macOS App - Apple Silicon to release
60+ - name : Attach macOS App - Apple Silicon to release
61+ if : github.event_name == 'release'
5762 uses : actions/upload-release-asset@v1
5863 with :
5964 upload_url : ${{ github.event.release.upload_url }}
@@ -64,19 +69,19 @@ jobs:
6469 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6570
6671 build-macOS-app-intel :
67- runs-on : macos-13
72+ runs-on : macos-15-intel
6873 steps :
69- - name : Print the branch currently working on
70- run : echo "BRANCH_NAME =${{ matrix.branch-name }}"
74+ - name : Print ref and SHA
75+ run : echo "REF =${{ github.ref_name }} SHA=${{ github.sha }}"
7176 - name : Check out the branch
72- uses : actions/checkout@v2
77+ uses : actions/checkout@v4
7378 with :
7479 submodules : true
7580
7681 - name : Set up Python
77- uses : actions/setup-python@v2
82+ uses : actions/setup-python@v5
7883 with :
79- python-version : ' 3.9'
84+ python-version : " 3.9"
8085
8186 - name : Install dependencies
8287 run : |
9499 zip -r ../cat-relay-mac-x64.zip CatRelay.app
95100 shell : bash
96101
97- - name : Attache macOS App - Intel to release
102+ - name : Attach macOS App - Intel to release
103+ if : github.event_name == 'release'
98104 uses : actions/upload-release-asset@v1
99105 with :
100106 upload_url : ${{ github.event.release.upload_url }}
@@ -107,16 +113,16 @@ jobs:
107113 build-windows-app :
108114 runs-on : windows-latest
109115 steps :
110- - name : Print the branch currently working on
111- run : echo "BRANCH_NAME =${{ matrix.branch-name }}"
116+ - name : Print ref and SHA
117+ run : echo "REF =${{ github.ref_name }} SHA=${{ github.sha }}"
112118 - name : Check out the branch
113- uses : actions/checkout@v2
119+ uses : actions/checkout@v4
114120 with :
115121 submodules : true
116122 - name : Set up Python
117- uses : actions/setup-python@v2
123+ uses : actions/setup-python@v5
118124 with :
119- python-version : ' 3.9'
125+ python-version : " 3.9"
120126
121127 - name : Install dependencies
122128 run : |
@@ -134,6 +140,7 @@ jobs:
134140 Compress-Archive -Path .\* -DestinationPath ../cat-relay-win.zip
135141
136142 - name : Attach Windows App to release
143+ if : github.event_name == 'release'
137144 uses : actions/upload-release-asset@v1
138145 with :
139146 upload_url : ${{ github.event.release.upload_url }}
0 commit comments