build(mac): 📦 Add Apple Developer code signing support #22
+23
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
hardenedRuntime,entitlements,forceCodeSigning: false)CSC_LINK/CSC_KEY_PASSWORDenvironment variables in CI for automatic signingChanges
build/entitlements.mac.plistpackage.jsonbuild.macsection.github/workflows/release.ymlMotivation
macOS builds are currently unsigned, causing users to see "unidentified developer" Gatekeeper warnings on download. This PR adds Apple Developer ID code signing support so that signed DMGs can be distributed without security prompts.
The approach uses electron-builder's built-in
CSC_LINK/CSC_KEY_PASSWORDmechanism, which handles keychain management internally — keeping the CI config minimal and reliable.forceCodeSigning: falseensures contributors and forks without Apple certificates can still build unsigned artifacts without errors.Test Plan
APPLE_CERTIFICATEandAPPLE_CERTIFICATE_PASSWORDsecrets configured → verify signing output in Actions logCSC_IDENTITY_AUTO_DISCOVERY=false npm run build:mac→ build succeeds without certificatecodesign -d --entitlements :- release/mac-arm64/MarkPDFdown.appshows all 4 entitlementsRequired GitHub Secrets
APPLE_CERTIFICATE.p12Developer ID Application certificateAPPLE_CERTIFICATE_PASSWORD.p12file🤖 Generated with Claude Code