@@ -412,83 +412,6 @@ jobs:
412
412
path : ArduinoCreateAgent*
413
413
if-no-files-found : error
414
414
415
- # This job will sign and notarize mac installers
416
- code-sign-mac-installers :
417
- needs : package
418
- strategy :
419
- matrix :
420
- arch : [amd64]
421
-
422
- runs-on : macos-12
423
- steps :
424
- - name : Download artifact
425
- uses : actions/download-artifact@v3
426
- with :
427
- name : ArduinoCreateAgent-osx-${{ matrix.arch }}
428
- path : ArduinoCreateAgent-osx
429
-
430
- # zip artifacts do not mantain executable permission
431
- - name : Make executable
432
- run : chmod -v +x ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.app/Contents/MacOS/*
433
-
434
- - name : Import Code-Signing Certificates
435
- run : |
436
- echo "${{ secrets.INSTALLER_CERT_MAC_P12 }}" | base64 --decode > "${{ env.INSTALLER_CERT_MAC_PATH }}"
437
- security create-keychain -p "${{ env.KEYCHAIN_PASSWORD }}" "${{ env.KEYCHAIN }}"
438
- security default-keychain -s "${{ env.KEYCHAIN }}"
439
- security unlock-keychain -p "${{ env.KEYCHAIN_PASSWORD }}" "${{ env.KEYCHAIN }}"
440
- security import \
441
- "${{ env.INSTALLER_CERT_MAC_PATH }}" \
442
- -k "${{ env.KEYCHAIN }}" \
443
- -f pkcs12 \
444
- -A \
445
- -T "/usr/bin/codesign" \
446
- -P "${{ secrets.INSTALLER_CERT_MAC_PASSWORD }}"
447
- security set-key-partition-list \
448
- -S apple-tool:,apple: \
449
- -s \
450
- -k "${{ env.KEYCHAIN_PASSWORD }}" \
451
- "${{ env.KEYCHAIN }}"
452
-
453
- - name : Install gon for code signing and app notarization
454
- run : |
455
- wget -q https://github.com/mitchellh/gon/releases/download/v0.2.5/gon_macos.zip
456
- unzip gon_macos.zip -d /usr/local/bin
457
-
458
- - name : Write gon config to file
459
- # gon does not allow env variables in config file (https://github.com/mitchellh/gon/issues/20)
460
- run : |
461
- cat > gon.config_installer.hcl <<EOF
462
- source = ["ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.app"]
463
- bundle_id = "cc.arduino.${{ env.PROJECT_NAME }}-installer"
464
-
465
- sign {
466
- application_identity = "Developer ID Application: ARDUINO SA (7KT7ZWMCJT)"
467
- }
468
-
469
- dmg {
470
- output_path = "ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg"
471
- volume_name = "ArduinoCreateAgent"
472
- }
473
- EOF
474
-
475
- - name : Code sign and notarize app
476
- run : |
477
- echo "gon will notarize executable in ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.app"
478
- gon -log-level=debug -log-json gon.config_installer.hcl
479
- timeout-minutes : 30
480
-
481
- # tar dmg file to keep executable permission
482
- - name : Tar files to keep permissions
483
- run : tar -cvf ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.tar ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg
484
-
485
- - name : Upload artifacts
486
- uses : actions/upload-artifact@v3
487
- with :
488
- name : ArduinoCreateAgent-osx-${{ matrix.arch }}
489
- path : ArduinoCreateAgent*.tar
490
- if-no-files-found : error
491
-
492
415
create-release :
493
416
runs-on : ubuntu-20.04
494
417
needs : [build, code-sign-mac-installers]
0 commit comments