This commit is contained in:
perf3ct 2025-04-17 20:39:42 +00:00
parent 4859de492e
commit 18e6527191
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232

View File

@ -25,7 +25,7 @@ runs:
with: with:
p12-file-base64: ${{ env.APPLE_APP_CERTIFICATE_BASE64 }} p12-file-base64: ${{ env.APPLE_APP_CERTIFICATE_BASE64 }}
p12-password: ${{ env.APPLE_APP_CERTIFICATE_PASSWORD }} p12-password: ${{ env.APPLE_APP_CERTIFICATE_PASSWORD }}
keychain: build keychain: build-app
keychain-password: ${{ github.run_id }} keychain-password: ${{ github.run_id }}
- name: Install Installer certificate - name: Install Installer certificate
@ -34,17 +34,19 @@ runs:
with: with:
p12-file-base64: ${{ env.APPLE_INSTALLER_CERTIFICATE_BASE64 }} p12-file-base64: ${{ env.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
p12-password: ${{ env.APPLE_INSTALLER_CERTIFICATE_PASSWORD }} p12-password: ${{ env.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
keychain: build keychain: build-installer
keychain-password: ${{ github.run_id }} keychain-password: ${{ github.run_id }}
# We don't need to create a keychain here because we're using the build keychain that was created in the previous step # We need to create a separate keychain for the installer certificate
create-keychain: false create-keychain: true
- name: Verify certificates - name: Verify certificates
if: inputs.os == 'macos' if: inputs.os == 'macos'
shell: ${{ inputs.shell }} shell: ${{ inputs.shell }}
run: | run: |
echo "Available signing identities:" echo "Available signing identities in build-app keychain:"
security find-identity -v -p codesigning build.keychain security find-identity -v -p codesigning build-app.keychain
echo "Available signing identities in build-installer keychain:"
security find-identity -v -p codesigning build-installer.keychain
- name: Set up Python and other macOS dependencies - name: Set up Python and other macOS dependencies
if: ${{ inputs.os == 'macos' }} if: ${{ inputs.os == 'macos' }}
@ -96,10 +98,14 @@ runs:
dmg_file=$(find ./dist -name "*.dmg" -print -quit) dmg_file=$(find ./dist -name "*.dmg" -print -quit)
if [ -n "$dmg_file" ]; then if [ -n "$dmg_file" ]; then
echo "Found DMG: $dmg_file" echo "Found DMG: $dmg_file"
# Get the first valid signing identity from the keychain # Try to get a signing identity from both keychains
SIGNING_IDENTITY=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID Application" | head -1 | sed -E 's/.*"([^"]+)".*/\1/') SIGNING_IDENTITY=$(security find-identity -v -p codesigning build-app.keychain | grep "Developer ID Application" | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
if [ -z "$SIGNING_IDENTITY" ]; then if [ -z "$SIGNING_IDENTITY" ]; then
echo "Error: No valid Developer ID Application certificate found in keychain" echo "No valid Developer ID Application certificate found in build-app keychain, trying build-installer keychain"
SIGNING_IDENTITY=$(security find-identity -v -p codesigning build-installer.keychain | grep "Developer ID Application" | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
fi
if [ -z "$SIGNING_IDENTITY" ]; then
echo "Error: No valid Developer ID Application certificate found in any keychain"
exit 1 exit 1
fi fi
echo "Using signing identity: $SIGNING_IDENTITY" echo "Using signing identity: $SIGNING_IDENTITY"