Update build-macos.yml

This commit is contained in:
Anirudh Sevugan 2025-08-07 20:30:23 -05:00 committed by GitHub
parent 22fe95d424
commit 3c5ebd4ec4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,6 +41,7 @@ jobs:
run: |
if [ -z "$CERT_PEM" ]; then
echo "Certificate secret (MAC_CERTIFICATE_PEM) is missing. Skipping code signing."
exit 1
else
echo "Certificate secret found. Proceeding with code signing."
fi
@ -56,12 +57,18 @@ jobs:
# The -P flag specifies a blank password for the PEM file itself.
security import cert.pem -k build.keychain -P '' -T /usr/bin/codesign
# Trust the certificate for code signing
- name: Add certificate trust
run: |
KEYCHAIN_PASSWORD=""
# This is the crucial step to establish trust for electron-builder.
# Tell the keychain to trust the certificate for the purpose of code signing.
security set-key-partition-list \
-S apple-tool: \
-k "$KEYCHAIN_PASSWORD" \
build.keychain
- name: Verify identity
run: |
# Verify that the identity is now trusted
security find-identity -v -p codesigning build.keychain