fix(workflows): update local signing workflow to use certificate hash for improved identity handling and debugging
All checks were successful
Test Local Signing / test-local-signing (push) Successful in 9s
All checks were successful
Test Local Signing / test-local-signing (push) Successful in 9s
This commit is contained in:
parent
45baeeb390
commit
751105d1e2
@ -224,26 +224,29 @@ jobs:
|
||||
# Decide which keychain to use
|
||||
if [ "${USE_SYSTEM_CERT:-false}" = "true" ]; then
|
||||
echo "Using system keychain identity"
|
||||
IDENTITY=$(security find-identity -v -p codesigning | grep "Developer ID Application" | head -1 | awk -F '"' '{print $2}')
|
||||
# Get certificate hash instead of name to avoid ambiguity
|
||||
IDENTITY_HASH=$(security find-identity -v -p codesigning | grep "Developer ID Application" | head -1 | awk '{print $2}')
|
||||
echo "Using certificate hash: $IDENTITY_HASH"
|
||||
else
|
||||
# Make sure keychain is unlocked
|
||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
|
||||
echo "Using custom keychain identity"
|
||||
IDENTITY=$(security find-identity -v -p codesigning "$KEYCHAIN_PATH" | grep "Developer ID Application" | head -1 | awk -F '"' '{print $2}')
|
||||
# Get certificate hash instead of name to avoid ambiguity
|
||||
IDENTITY_HASH=$(security find-identity -v -p codesigning "$KEYCHAIN_PATH" | grep "Developer ID Application" | head -1 | awk '{print $2}')
|
||||
echo "Using certificate hash: $IDENTITY_HASH"
|
||||
fi
|
||||
|
||||
if [ -z "$IDENTITY" ]; then
|
||||
if [ -z "$IDENTITY_HASH" ]; then
|
||||
echo "❌ No valid Developer ID Application certificate found"
|
||||
echo "Falling back to ad-hoc signing for testing..."
|
||||
# Use ad-hoc identity as fallback
|
||||
codesign --force --deep --verbose --options runtime --entitlements LuckyWorld.entitlements --sign - --timestamp "$APP_PATH"
|
||||
echo "SIGNED=adhoc" >> "$GITHUB_ENV"
|
||||
else
|
||||
echo "Using identity: $IDENTITY"
|
||||
echo "Signing app bundle with Developer ID hash: $IDENTITY_HASH"
|
||||
|
||||
# Sign the app bundle
|
||||
echo "Signing app bundle with Developer ID..."
|
||||
codesign --force --deep --verbose --options runtime --entitlements LuckyWorld.entitlements --sign "$IDENTITY" --timestamp "$APP_PATH"
|
||||
# Sign the app bundle using the hash
|
||||
codesign --force --deep --verbose --options runtime --entitlements LuckyWorld.entitlements --sign "$IDENTITY_HASH" --timestamp "$APP_PATH"
|
||||
echo "SIGNED=identity" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user