Skip to content

Commit d2b7f44

Browse files
SDSLeonclaude
andcommitted
build(macos): enable Developer ID signing and notarization for releases
Squirrel.Mac rejected ad-hoc-signed update bundles, breaking in-place auto-update on macOS. Hardened runtime + entitlements + notarization makes the designated requirement stable across builds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6c87988 commit d2b7f44

3 files changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@ jobs:
158158
shell: bash
159159
env:
160160
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
161+
# macOS Developer ID signing (base64-encoded .p12 + password).
162+
# No-op on Windows/Linux runners.
163+
CSC_LINK: ${{ secrets.MAC_CSC_LINK }}
164+
CSC_KEY_PASSWORD: ${{ secrets.MAC_CSC_KEY_PASSWORD }}
165+
# macOS notarization via Apple ID + app-specific password.
166+
APPLE_ID: ${{ secrets.APPLE_ID }}
167+
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
168+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
161169

162170
- name: Upload built artifacts
163171
uses: actions/upload-artifact@v7

build/entitlements.mac.plist

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.cs.allow-jit</key>
6+
<true/>
7+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
8+
<true/>
9+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
10+
<true/>
11+
<key>com.apple.security.cs.disable-library-validation</key>
12+
<true/>
13+
<key>com.apple.security.cs.debugger</key>
14+
<true/>
15+
</dict>
16+
</plist>

electron-builder.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,5 +167,10 @@ mac:
167167
icon: build/icon.icns
168168
category: public.app-category.developer-tools
169169
artifactName: ${productName}-${version}-${arch}.${ext}
170+
hardenedRuntime: true
171+
gatekeeperAssess: false
172+
entitlements: build/entitlements.mac.plist
173+
entitlementsInherit: build/entitlements.mac.plist
174+
notarize: true
170175

171176
npmRebuild: true

0 commit comments

Comments
 (0)