@@ -128,12 +128,12 @@ jobs:
128128 if-no-files-found : ignore
129129
130130 # ===========================================================================
131- # macOS Signing and Notarization (Release only)
131+ # macOS Signing and Notarization
132132 # ===========================================================================
133133 sign-macos :
134134 name : Sign & Notarize (macOS)
135135 needs : build
136- if : github.event_name == 'release'
136+ if : ( github.event_name == 'release' || github.event_name == 'workflow_dispatch')
137137 runs-on : macos-14
138138
139139 steps :
@@ -156,9 +156,6 @@ jobs:
156156 rmdir "$SUBDIR"
157157 ls -la
158158
159- # -----------------------------------------------------------------------
160- # Install Apple Certificates
161- # -----------------------------------------------------------------------
162159 - name : Install Apple Certificates
163160 env :
164161 MACOS_CERTIFICATE : ${{ secrets.PROD_MACOS_CERTIFICATE }}
@@ -186,9 +183,6 @@ jobs:
186183 IDENTITY=$(security find-identity -v -p codesigning $KEYCHAIN_PATH | grep "Developer ID Application" | head -1 | awk -F'"' '{print $2}')
187184 echo "APPLE_CODE_SIGN_IDENTITY_APP=$IDENTITY" >> $GITHUB_ENV
188185
189- # -----------------------------------------------------------------------
190- # Setup Notarization Credentials
191- # -----------------------------------------------------------------------
192186 - name : Setup Notarization
193187 env :
194188 NOTARIZATION_APPLE_ID : ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
@@ -201,9 +195,6 @@ jobs:
201195 --team-id "$NOTARIZATION_TEAM_ID"
202196 echo "APPLE_NOTARIZE_KEYCHAIN_PROFILE=notarize-profile" >> $GITHUB_ENV
203197
204- # -----------------------------------------------------------------------
205- # Sign and Notarize
206- # -----------------------------------------------------------------------
207198 - name : Sign and Notarize
208199 env :
209200 ENTITLEMENTS_FILE : ${{ github.workspace }}/app.entitlements
@@ -226,17 +217,10 @@ jobs:
226217 ./scripts/sign_and_notarize.sh "$CLI_PATH" --notarize
227218 fi
228219
229- # -----------------------------------------------------------------------
230- # Repackage
231- # -----------------------------------------------------------------------
232220 - name : Repackage
233221 run : |
234222 cd packages
235223
236- # Debug: show what we have
237- echo "Contents of packages directory:"
238- ls -la
239-
240224 # Remove original unsigned package
241225 rm -f *.tar.gz
242226
@@ -245,8 +229,9 @@ jobs:
245229 echo "Detected version: $VERSION"
246230
247231 # Create signed package with CLI and its Frameworks (universal binary)
232+ # Note: LabRecorder.cfg, LICENSE, README.md are inside LabRecorder.app/Contents/MacOS/
248233 tar -cvzf "LabRecorder-${VERSION}-macOS_universal-signed.tar.gz" \
249- LabRecorder.app LabRecorderCLI Frameworks LabRecorder.cfg LICENSE README.md
234+ LabRecorder.app LabRecorderCLI Frameworks
250235
251236 echo "Created package:"
252237 ls -la *.tar.gz
@@ -257,19 +242,13 @@ jobs:
257242 name : package-macos-signed
258243 path : packages/*-signed.tar.gz
259244
260- - name : Upload to Release
261- if : github.event_name == 'release'
262- uses : softprops/action-gh-release@v2
263- with :
264- files : packages/*-signed.tar.gz
265-
266245 # ===========================================================================
267- # Upload unsigned packages to release
246+ # Upload packages to release
268247 # ===========================================================================
269248 release :
270249 name : Upload to Release
271- needs : build
272- if : github.event_name == 'release'
250+ needs : [ build, sign-macos]
251+ if : github.event_name == 'release' && !failure() && !cancelled()
273252 runs-on : ubuntu-latest
274253
275254 steps :
@@ -282,6 +261,7 @@ jobs:
282261 uses : softprops/action-gh-release@v2
283262 with :
284263 files : |
285- artifacts/** /*.zip
264+ artifacts/package-macos-signed /*.tar.gz
286265 artifacts/package-ubuntu-*/*.tar.gz
287- artifacts/**/*.deb
266+ artifacts/package-ubuntu-*/*.deb
267+ artifacts/package-windows-*/*.zip
0 commit comments