@@ -48,19 +48,67 @@ jobs:
48
48
env :
49
49
MACOS_CERTIFICATE_PASSWORD : ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
50
50
51
- - name : Setup notarization credentials
51
+ - name : Setup notarization credentials and entitlements
52
52
if : matrix.os == 'macos-latest'
53
53
run : |
54
- echo ${{ secrets.GODOT_MACOS_NOTARIZATION_API_KEY }} | base64 --decode > notarization_api_key.p8
54
+ # Save API key to file
55
+ echo "${{ secrets.GODOT_MACOS_NOTARIZATION_API_KEY }}" | base64 --decode > ./notarization_api_key.p8
56
+
57
+ # Verify API key file exists and has content
58
+ if [ -s "./notarization_api_key.p8" ]; then
59
+ echo "API key file created successfully"
60
+ else
61
+ echo "Error: API key file is empty or not created"
62
+ exit 1
63
+ fi
64
+
65
+ # Create build directory and add entitlements file
66
+ mkdir -p build
67
+ cat > build/entitlements.mac.plist << 'EOL'
68
+ <?xml version="1.0" encoding="UTF-8"?>
69
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
70
+ <plist version="1.0">
71
+ <dict>
72
+ <key>com.apple.security.cs.allow-jit</key>
73
+ <true/>
74
+ <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
75
+ <true/>
76
+ <key>com.apple.security.cs.allow-dyld-environment-variables</key>
77
+ <true/>
78
+ <key>com.apple.security.cs.disable-library-validation</key>
79
+ <true/>
80
+ <key>com.apple.security.inherit</key>
81
+ <true/>
82
+ <key>com.apple.security.automation.apple-events</key>
83
+ <true/>
84
+ </dict>
85
+ </plist>
86
+ EOL
55
87
56
- - name : Build Electron app
57
- if : matrix.os != 'ubuntu -latest-large '
88
+ - name : Build Electron app (macOS)
89
+ if : matrix.os == 'macos -latest'
58
90
env :
59
91
DEBUG : electron-builder
60
92
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
61
- APPLE_API_KEY : ${{ secrets.GODOT_MACOS_NOTARIZATION_API_KEY }}
62
93
APPLE_API_KEY_ID : ${{ secrets.GODOT_MACOS_NOTARIZATION_API_KEY_ID }}
63
- APPLE_API_KEY_ISSUER : ${{ secrets.GODOT_MACOS_NOTARIZATION_API_UUID }}
94
+ APPLE_API_KEY : ${{ secrets.GODOT_MACOS_NOTARIZATION_API_KEY }}
95
+ APPLE_API_ISSUER : ${{ secrets.GODOT_MACOS_NOTARIZATION_API_UUID }}
96
+ run : |
97
+ # Debug: Verify environment variables are set (without exposing values)
98
+ if [ -n "$APPLE_API_KEY" ]; then echo "APPLE_API_KEY is set"; else echo "APPLE_API_KEY is NOT set"; fi
99
+ if [ -n "$APPLE_API_KEY_ID" ]; then echo "APPLE_API_KEY_ID is set"; else echo "APPLE_API_KEY_ID is NOT set"; fi
100
+ if [ -n "$APPLE_API_ISSUER" ]; then echo "APPLE_API_ISSUER is set"; else echo "APPLE_API_ISSUER is NOT set"; fi
101
+
102
+ # Print electron-builder version for debugging
103
+ npx electron-builder --version
104
+
105
+ npm run electron-build
106
+
107
+ - name : Build Electron app (Windows)
108
+ if : matrix.os == 'windows-latest'
109
+ env :
110
+ DEBUG : electron-builder
111
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
64
112
run : npm run electron-build
65
113
66
114
- name : Build Electron app (Linux)
0 commit comments