20
20
INSTALLER_CERT_MAC_PATH : " /tmp/ArduinoCerts2020.p12"
21
21
AC_USERNAME : ${{ secrets.AC_USERNAME }} # used by gon
22
22
AC_PASSWORD : ${{ secrets.AC_PASSWORD }} # used by gon
23
+ AC_PROVIDER : ${{ secrets.AC_PROVIDER }} # used by gon
23
24
# See: https://github.com/actions/setup-go/tree/v3#readme
24
25
GO_VERSION : " 1.20"
25
26
@@ -261,7 +262,7 @@ jobs:
261
262
-k "${{ env.KEYCHAIN_PASSWORD }}" \
262
263
"${{ env.KEYCHAIN }}"
263
264
264
- - name : Install gon for code signing and app notarization
265
+ - name : Install gon for code signing
265
266
uses : actions/checkout@v4
266
267
with :
267
268
repository : darkvertex/gon # this fork has support for --deep notarization
@@ -288,16 +289,41 @@ jobs:
288
289
deep = true
289
290
}
290
291
291
- # Ask Gon for zip output to force notarization process to take place.
292
- # The CI will upload the zip output
293
- zip {
294
- output_path = "ArduinoCreateAgent.app_${{ matrix.arch }}_notarized.zip"
295
- }
296
292
EOF
297
293
298
- - name : Sign and notarize binary
294
+ - name : Sign app bundle
299
295
run : gon -log-level=debug -log-json "${{ env.GON_CONFIG_PATH }}"
300
296
297
+ - name : Remove gon used for code signing
298
+ run : |
299
+ rm /usr/local/bin/gon
300
+ rm ${{ env.GON_CONFIG_PATH }}
301
+
302
+ - name : Install gon for app notarization
303
+ run : |
304
+ wget -q https://github.com/Bearer/gon/releases/download/v0.0.27/gon_macos.zip
305
+ unzip gon_macos.zip -d /usr/local/bin
306
+
307
+ - name : Write gon config to file
308
+ run : |
309
+ cat > "${{ env.GON_CONFIG_PATH }}" <<EOF
310
+ # See: https://github.com/Bearer/gon#configuration-file
311
+
312
+ notarize {
313
+ path = "ArduinoCreateAgent.app"
314
+ bundle_id = "cc.arduino.${{ env.PROJECT_NAME }}"
315
+ staple = true
316
+ }
317
+
318
+ EOF
319
+
320
+ - name : Notarize app bundle
321
+ run : |
322
+ gon -log-level=debug -log-json "${{ env.GON_CONFIG_PATH }}"
323
+
324
+ - name : Zip output app bundle
325
+ run : zip ArduinoCreateAgent.app_${{ matrix.arch }}_notarized.zip ArduinoCreateAgent.app
326
+
301
327
- name : Upload autoupdate bundle to Arduino downloads servers
302
328
run : aws s3 cp ArduinoCreateAgent.app_${{ matrix.arch }}_notarized.zip s3://${{ secrets.DOWNLOADS_BUCKET }}${{ env.TARGET }}${GITHUB_REF/refs\/tags\//}/ # the version should be created in th the build job
303
329
if : ${{ needs.build.outputs.prerelease != 'true' }}
@@ -475,7 +501,7 @@ jobs:
475
501
476
502
- name : Install gon for code signing and app notarization
477
503
run : |
478
- wget -q https://github.com/mitchellh /gon/releases/download/v0.2.5 /gon_macos.zip
504
+ wget -q https://github.com/Bearer /gon/releases/download/v0.0.27 /gon_macos.zip
479
505
unzip gon_macos.zip -d /usr/local/bin
480
506
481
507
- name : Write gon config to file
@@ -490,17 +516,13 @@ jobs:
490
516
}
491
517
492
518
# Ask Gon for zip output to force notarization process to take place.
493
- # The CI will not upload the zip output
494
519
zip {
495
520
output_path = "ArduinoCreateAgent.app_${{ matrix.arch }}_notarized.zip"
496
521
}
497
522
EOF
498
523
499
524
- name : Code sign and notarize app
500
- run : |
501
- echo "gon will notarize executable in ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg"
502
- gon -log-level=debug -log-json gon.config_installer.hcl
503
- timeout-minutes : 30
525
+ run : gon -log-level=debug -log-json gon.config_installer.hcl
504
526
505
527
# tar dmg file to keep executable permission
506
528
- name : Tar files to keep permissions
0 commit comments