Update desktop-build.yml

This commit is contained in:
tooomm 2026-03-15 18:21:26 +01:00 committed by GitHub
parent d38b6d0b9c
commit 1d4b757e00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -464,25 +464,27 @@ jobs:
- name: Sign app bundle
if: matrix.os == 'macOS' && matrix.make_package
id: sign_macos
shell: bash
env:
MACOS_CERTIFICATE_NAME: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }}
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
run: |
if [[ -n "$MACOS_CERTIFICATE_NAME" ]]
then
if [[ -n "$MACOS_CERTIFICATE_NAME" ]]; then
security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
/usr/bin/codesign --sign="$MACOS_CERTIFICATE_NAME" --entitlements=".ci/macos.entitlements" --options=runtime --force --deep --timestamp --verbose ${{steps.build.outputs.path}}
echo ""
codesign -dv --verbose=4 ${{steps.build.outputs.path}}
fi
- name: Notarize app bundle
if: steps.sign_macos.outcome == 'success' && needs.configure.outputs.tag != null
shell: bash
env:
MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
MACOS_NOTARIZATION_PWD: ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
run: |
if [[ -n "$MACOS_NOTARIZATION_APPLE_ID" ]]
then
if [[ -n "$MACOS_NOTARIZATION_APPLE_ID" ]]; then
# Store the notarization credentials so that we can prevent a UI password dialog from blocking the CI
echo "Create keychain profile"
xcrun notarytool store-credentials "notarytool-profile" --apple-id "$MACOS_NOTARIZATION_APPLE_ID" --team-id "$MACOS_NOTARIZATION_TEAM_ID" --password "$MACOS_NOTARIZATION_PWD"
@ -504,6 +506,15 @@ jobs:
# validated by macOS even when an internet connection is not available.
echo "Attach staple"
xcrun stapler staple ${{steps.build.outputs.path}}
echo "Verify notarization status"
spctl -a -v ${{steps.build.outputs.path}}
echo "Check Gatekeeper assessment"
spctl --assess --type execute --verbose ${{steps.build.outputs.path}}
echo "Validate notarization ticket"
xcrun stapler validate ${{steps.build.outputs.path}}
fi
- name: Upload artifact