File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 5454 build-macos :
5555 if : ${{ github.event_name == 'push' || inputs.platform == 'all' || inputs.platform == 'macos' }}
5656 runs-on : macos-latest
57+ env :
58+ HAS_CERT : ${{ secrets.MAC_CERT_P12_BASE64 != '' && 'true' || 'false' }}
5759 steps :
5860 - uses : actions/checkout@v4
5961
@@ -68,16 +70,23 @@ jobs:
6870 - name : Build Electron app
6971 run : npm run electron:build
7072
73+ - name : Decode signing certificate
74+ if : ${{ env.HAS_CERT == 'true' }}
75+ env :
76+ MAC_CERT_P12_BASE64 : ${{ secrets.MAC_CERT_P12_BASE64 }}
77+ run : echo "$MAC_CERT_P12_BASE64" | base64 --decode > /tmp/cert.p12
78+
7179 - name : Package for macOS (x64 + arm64)
7280 env :
73- CSC_LINK : ${{ secrets.MAC_CERT_P12_BASE64 }}
81+ CSC_LINK : ${{ env.HAS_CERT == 'true' && '/tmp/cert.p12' || '' }}
7482 CSC_KEY_PASSWORD : ${{ secrets.MAC_CERT_PASSWORD }}
7583 APPLE_ID : ${{ secrets.APPLE_ID }}
7684 APPLE_APP_SPECIFIC_PASSWORD : ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
7785 APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
7886 run : npx electron-builder --mac --config electron-builder.yml --publish never
7987
8088 - name : Verify code signature
89+ if : ${{ env.HAS_CERT == 'true' }}
8190 run : |
8291 # Verify every .app bundle produced (arm64 + x64)
8392 APPS=$(find release -name "CodePilot.app" -maxdepth 3)
You can’t perform that action at this time.
0 commit comments