feat(ci): add notarization step on macOS release
This commit is contained in:
parent
2ea452bf61
commit
e2e272f498
36
.github/workflows/release.yml
vendored
36
.github/workflows/release.yml
vendored
|
@ -8,6 +8,8 @@ on:
|
|||
branches:
|
||||
- master
|
||||
- dev
|
||||
# TODO: remove once finished
|
||||
- feat/add-macos-notarization-step
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@ -181,6 +183,23 @@ jobs:
|
|||
security import certificate.p12 -k buildespanso.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
|
||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" buildespanso.keychain
|
||||
/usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" target/mac/Espanso.app -v
|
||||
- name: "Notarize executable"
|
||||
env:
|
||||
PROD_MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
|
||||
PROD_MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
|
||||
PROD_MACOS_NOTARIZATION_PWD: ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
|
||||
run: |
|
||||
echo "Create keychain profile"
|
||||
xcrun notarytool store-credentials "espanso-notarytool-profile" --apple-id "$PROD_MACOS_NOTARIZATION_APPLE_ID" --team-id "$PROD_MACOS_NOTARIZATION_TEAM_ID" --password "$PROD_MACOS_NOTARIZATION_PWD"
|
||||
|
||||
echo "Creating temp notarization archive"
|
||||
ditto -c -k --keepParent "target/mac/Espanso.app" "notarization.zip"
|
||||
|
||||
echo "Notarize app"
|
||||
xcrun notarytool submit "notarization.zip" --keychain-profile "espanso-notarytool-profile" --wait
|
||||
|
||||
echo "Attach staple"
|
||||
xcrun stapler staple "target/mac/Espanso.app"
|
||||
- name: Create ZIP archive
|
||||
run: |
|
||||
ditto -c -k --sequesterRsrc --keepParent target/mac/Espanso.app Espanso-Mac-Intel.zip
|
||||
|
@ -230,6 +249,23 @@ jobs:
|
|||
security import certificate.p12 -k buildespanso.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
|
||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" buildespanso.keychain
|
||||
/usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" target/mac/Espanso.app -v
|
||||
- name: "Notarize executable"
|
||||
env:
|
||||
PROD_MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
|
||||
PROD_MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
|
||||
PROD_MACOS_NOTARIZATION_PWD: ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
|
||||
run: |
|
||||
echo "Create keychain profile"
|
||||
xcrun notarytool store-credentials "espanso-notarytool-profile" --apple-id "$PROD_MACOS_NOTARIZATION_APPLE_ID" --team-id "$PROD_MACOS_NOTARIZATION_TEAM_ID" --password "$PROD_MACOS_NOTARIZATION_PWD"
|
||||
|
||||
echo "Creating temp notarization archive"
|
||||
ditto -c -k --keepParent "target/mac/Espanso.app" "notarization.zip"
|
||||
|
||||
echo "Notarize app"
|
||||
xcrun notarytool submit "notarization.zip" --keychain-profile "espanso-notarytool-profile" --wait
|
||||
|
||||
echo "Attach staple"
|
||||
xcrun stapler staple "target/mac/Espanso.app"
|
||||
- name: Create ZIP archive
|
||||
run: |
|
||||
ditto -c -k --sequesterRsrc --keepParent target/mac/Espanso.app Espanso-Mac-M1.zip
|
||||
|
|
Loading…
Reference in New Issue
Block a user