2525 with :
2626 p12-file-base64 : ${{ env.APPLE_APP_CERTIFICATE_BASE64 }}
2727 p12-password : ${{ env.APPLE_APP_CERTIFICATE_PASSWORD }}
28- keychain : build
28+ keychain : build-app
2929 keychain-password : ${{ github.run_id }}
3030
3131 - name : Install Installer certificate
@@ -34,17 +34,19 @@ runs:
3434 with :
3535 p12-file-base64 : ${{ env.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
3636 p12-password : ${{ env.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
37- keychain : build
37+ keychain : build-installer
3838 keychain-password : ${{ github.run_id }}
39- # We don't need to create a keychain here because we're using the build keychain that was created in the previous step
40- create-keychain : false
39+ # We need to create a separate keychain for the installer certificate
40+ create-keychain : true
4141
4242 - name : Verify certificates
4343 if : inputs.os == 'macos'
4444 shell : ${{ inputs.shell }}
4545 run : |
46- echo "Available signing identities:"
47- security find-identity -v -p codesigning build.keychain
46+ echo "Available signing identities in build-app keychain:"
47+ security find-identity -v -p codesigning build-app.keychain
48+ echo "Available signing identities in build-installer keychain:"
49+ security find-identity -v -p codesigning build-installer.keychain
4850
4951 - name : Set up Python and other macOS dependencies
5052 if : ${{ inputs.os == 'macos' }}
@@ -96,10 +98,14 @@ runs:
9698 dmg_file=$(find ./dist -name "*.dmg" -print -quit)
9799 if [ -n "$dmg_file" ]; then
98100 echo "Found DMG: $dmg_file"
99- # Get the first valid signing identity from the keychain
100- SIGNING_IDENTITY=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID Application" | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
101+ # Try to get a signing identity from both keychains
102+ SIGNING_IDENTITY=$(security find-identity -v -p codesigning build-app .keychain | grep "Developer ID Application" | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
101103 if [ -z "$SIGNING_IDENTITY" ]; then
102- echo "Error: No valid Developer ID Application certificate found in keychain"
104+ echo "No valid Developer ID Application certificate found in build-app keychain, trying build-installer keychain"
105+ SIGNING_IDENTITY=$(security find-identity -v -p codesigning build-installer.keychain | grep "Developer ID Application" | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
106+ fi
107+ if [ -z "$SIGNING_IDENTITY" ]; then
108+ echo "Error: No valid Developer ID Application certificate found in any keychain"
103109 exit 1
104110 fi
105111 echo "Using signing identity: $SIGNING_IDENTITY"
0 commit comments