Skip to content

Commit 8c630a6

Browse files
committed
fix(ci): move mac entitlements out of gitignored build/ so it's committed
1 parent 541c568 commit 8c630a6

3 files changed

Lines changed: 29 additions & 8 deletions

File tree

.github/workflows/florin-release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ jobs:
3333
# notarytool with the APPLE_* creds and staples the result. If these
3434
# secrets are unset the build is produced unsigned instead of failing.
3535
#
36-
# Entitlements are passed as an ABSOLUTE path: in this pnpm monorepo the
37-
# relative `build/entitlements.mac.plist` from electron-builder.yml gets
38-
# resolved by codesign against the wrong CWD ("cannot read entitlement
39-
# data"). $PWD is apps/desktop here, so this always resolves.
36+
# Entitlements passed as an ABSOLUTE path so codesign always resolves it
37+
# regardless of its CWD. The plist lives at apps/desktop/entitlements.mac.plist
38+
# (NOT under build/, which .gitignore excludes — that's why an earlier
39+
# run got "cannot read entitlement data": the file wasn't committed).
4040
run: |
4141
cd apps/desktop
4242
pnpm exec electron-builder --mac --publish never \
43-
--config.mac.entitlements="$PWD/build/entitlements.mac.plist" \
44-
--config.mac.entitlementsInherit="$PWD/build/entitlements.mac.plist"
43+
--config.mac.entitlements="$PWD/entitlements.mac.plist" \
44+
--config.mac.entitlementsInherit="$PWD/entitlements.mac.plist"
4545
env:
4646
CSC_LINK: ${{ secrets.CSC_LINK }}
4747
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}

apps/desktop/electron-builder.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ mac:
4242
# and skips notarization — CI is the only place the secrets exist.
4343
hardenedRuntime: true
4444
gatekeeperAssess: false
45-
entitlements: build/entitlements.mac.plist
46-
entitlementsInherit: build/entitlements.mac.plist
45+
entitlements: entitlements.mac.plist
46+
entitlementsInherit: entitlements.mac.plist
4747
notarize: true
4848
target:
4949
# dmg = manual install / first bootstrap; zip = what electron-updater
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<!-- Electron's V8 JIT needs writable+executable memory under the hardened
6+
runtime; without these, notarization passes but the app crashes on
7+
launch. -->
8+
<key>com.apple.security.cs.allow-jit</key>
9+
<true/>
10+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
11+
<true/>
12+
<!-- better-sqlite3 ships a prebuilt native .node; library validation would
13+
reject loading a differently-signed dylib into the signed app. -->
14+
<key>com.apple.security.cs.disable-library-validation</key>
15+
<true/>
16+
<!-- The main process sets env vars (e.g. NODE_TLS_REJECT_UNAUTHORIZED for the
17+
self-signed localhost server) that the loader must honor. -->
18+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
19+
<true/>
20+
</dict>
21+
</plist>

0 commit comments

Comments
 (0)