@@ -209,6 +209,13 @@ jobs:
209209 echo "✅ Installer certificate imported"
210210 fi
211211
212+ # Download and import Apple WWDR intermediate certificate (required for cert chain validation)
213+ echo "=== Importing Apple WWDR Intermediate Certificate ==="
214+ curl -sL "https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer" -o AppleWWDRCAG3.cer
215+ security import AppleWWDRCAG3.cer -k temp.keychain -T /usr/bin/codesign -T /usr/bin/productsign
216+ rm AppleWWDRCAG3.cer
217+ echo "✅ Apple WWDR G3 intermediate certificate imported"
218+
212219 # Configure keychain
213220 security set-key-partition-list -S apple-tool:,apple:,codesign:,productsign: -s -k "$KEYCHAIN_PASSWORD" temp.keychain
214221 security default-keychain -s temp.keychain
@@ -218,6 +225,10 @@ jobs:
218225 echo "=== Available signing identities ==="
219226 security find-identity -v temp.keychain | sed 's/\("[^"]*"\)/"***"/g'
220227
228+ echo ""
229+ echo "=== Available installer identities ==="
230+ security find-identity -v temp.keychain | grep -i "installer" | sed 's/\("[^"]*"\)/"***"/g' || echo "No installer identities found"
231+
221232 - name : Build application
222233 run : npm run private:compile
223234
@@ -262,12 +273,25 @@ jobs:
262273 fi
263274
264275 - name : Build macOS app (MAS target - Universal)
265- run : npm run private:build:mac
266276 env :
267277 # Enable code signing if certificates are available
268278 CSC_LINK : ${{ secrets.APPLE_APP_CERT_BASE64 }}
269279 CSC_KEY_PASSWORD : ${{ secrets.APPLE_CERT_PASSWORD }}
270280 APPLE_DEVELOPER_ID : ${{ secrets.APPLE_DEVELOPER_ID }}
281+ APPLE_CERT_PASSWORD : ${{ secrets.APPLE_CERT_PASSWORD }}
282+ run : |
283+ # Ensure keychain is unlocked and in search path for productsign
284+ security unlock-keychain -p "actions" temp.keychain || true
285+ security list-keychains -d user -s "$HOME/Library/Keychains/temp.keychain-db" "$HOME/Library/Keychains/login.keychain-db"
286+ security default-keychain -s temp.keychain
287+
288+ # Verify installer identity is available
289+ echo "=== Checking for installer identity ==="
290+ security find-identity -v -p codesigning temp.keychain | grep -i "installer" || echo "Warning: No installer identity found in temp.keychain"
291+ security find-identity -v temp.keychain | grep -i "installer" || echo "Warning: No installer identity found"
292+
293+ # Run the build
294+ npm run private:build:mac
271295
272296 - name : Sign macOS PKG
273297 env :
0 commit comments