Skip to content

Commit 5aea7ef

Browse files
committed
Test adding mac build entitlements
1 parent 777d8d5 commit 5aea7ef

File tree

1 file changed

+41
-2
lines changed

1 file changed

+41
-2
lines changed

.github/workflows/build.yml

+41-2
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,49 @@ jobs:
4848
env:
4949
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
5050

51-
- name: Setup notarization credentials
51+
- name: Setup notarization credentials and entitlements
5252
if: matrix.os == 'macos-latest'
5353
run: |
5454
echo ${{ secrets.GODOT_MACOS_NOTARIZATION_API_KEY }} | base64 --decode > notarization_api_key.p8
55+
mkdir -p build
56+
cat > build/entitlements.mac.plist << 'EOF'
57+
<?xml version="1.0" encoding="UTF-8"?>
58+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
59+
<plist version="1.0">
60+
<dict>
61+
<key>com.apple.security.cs.allow-jit</key>
62+
<true/>
63+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
64+
<true/>
65+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
66+
<true/>
67+
<key>com.apple.security.files.user-selected.read-write</key>
68+
<true/>
69+
<key>com.apple.security.files.downloads.read-write</key>
70+
<true/>
71+
<key>com.apple.security.network.client</key>
72+
<true/>
73+
<key>com.apple.security.network.server</key>
74+
<true/>
75+
</dict>
76+
</plist>
77+
EOF
78+
chmod 644 build/entitlements.mac.plist
79+
80+
- name: Verify entitlements file (macOS)
81+
if: matrix.os == 'macos-latest'
82+
run: |
83+
echo "Verifying entitlements file..."
84+
if [ ! -f build/entitlements.mac.plist ]; then
85+
echo "Error: entitlements.mac.plist not found"
86+
exit 1
87+
fi
88+
if [ ! -r build/entitlements.mac.plist ]; then
89+
echo "Error: entitlements.mac.plist not readable"
90+
exit 1
91+
fi
92+
echo "Validating plist format..."
93+
plutil -lint build/entitlements.mac.plist
5594
5695
- name: Build Electron app
5796
if: matrix.os != 'ubuntu-latest-large'
@@ -62,7 +101,7 @@ jobs:
62101
APPLE_API_KEY_ID: ${{ secrets.GODOT_MACOS_NOTARIZATION_API_KEY_ID }}
63102
APPLE_API_KEY_ISSUER: ${{ secrets.GODOT_MACOS_NOTARIZATION_API_UUID }}
64103
run: npm run electron-build
65-
104+
66105
- name: Build Electron app (Linux)
67106
if: matrix.os == 'ubuntu-latest-large'
68107
env:

0 commit comments

Comments
 (0)