Skip to content

Commit 6fcfe65

Browse files
timiclaude
authored andcommitted
fix: import Apple intermediate certificates in CI
CI environment lacks Apple's intermediate certificates (AppleWWDRCAG3 and DeveloperIDG2CA) that are required to complete the signing chain. Download and import these certificates before building to fix code signing failures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8a9c35c commit 6fcfe65

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,31 @@ jobs:
106106
# Remove POSTGRES_URL to skip database migration in CI
107107
grep -v '^POSTGRES_URL=' .env > .env.tmp && mv .env.tmp .env
108108
109+
- name: Import Apple Certificate and Intermediate Certificates
110+
env:
111+
APPLE_CERTIFICATE: "${{ secrets.APPLE_CERTIFICATE }}"
112+
APPLE_CERTIFICATE_PASSWORD: "${{ secrets.APPLE_CERTIFICATE_PASSWORD }}"
113+
run: |
114+
# Create a new keychain
115+
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
116+
security create-keychain -p "" $KEYCHAIN_PATH
117+
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
118+
security unlock-keychain -p "" $KEYCHAIN_PATH
119+
120+
# Import the Apple certificate
121+
echo "$APPLE_CERTIFICATE" | base64 --decode > cert.p12
122+
security import cert.p12 -P "$APPLE_CERTIFICATE_PASSWORD" -A -k $KEYCHAIN_PATH
123+
rm cert.p12
124+
125+
# Download and import Apple intermediate certificates (not available in CI)
126+
curl -s -o /tmp/AppleWWDRCAG3.cer https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer
127+
curl -s -o /tmp/DeveloperIDG2CA.cer https://www.apple.com/certificateauthority/DeveloperIDG2CA.cer
128+
security import /tmp/AppleWWDRCAG3.cer -A -k $KEYCHAIN_PATH
129+
security import /tmp/DeveloperIDG2CA.cer -A -k $KEYCHAIN_PATH
130+
131+
# List keychains to ensure system can access certificates
132+
security list-keychain -d user -s $KEYCHAIN_PATH
133+
109134
- name: Build Tauri app (Apple Silicon)
110135
working-directory: ./lumis/apps/web
111136
run: pnpm tauri:build

0 commit comments

Comments
 (0)