WIP: feat(workflows): add new build workflows for Windows, Linux, and macOS, and remove obsolete build scripts #17
@ -224,26 +224,29 @@ jobs:
|
|||||||
# Decide which keychain to use
|
# Decide which keychain to use
|
||||||
if [ "${USE_SYSTEM_CERT:-false}" = "true" ]; then
|
if [ "${USE_SYSTEM_CERT:-false}" = "true" ]; then
|
||||||
echo "Using system keychain identity"
|
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
|
else
|
||||||
# Make sure keychain is unlocked
|
# Make sure keychain is unlocked
|
||||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
|
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
|
||||||
echo "Using custom keychain identity"
|
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
|
fi
|
||||||
|
|
||||||
if [ -z "$IDENTITY" ]; then
|
if [ -z "$IDENTITY_HASH" ]; then
|
||||||
echo "❌ No valid Developer ID Application certificate found"
|
echo "❌ No valid Developer ID Application certificate found"
|
||||||
echo "Falling back to ad-hoc signing for testing..."
|
echo "Falling back to ad-hoc signing for testing..."
|
||||||
# Use ad-hoc identity as fallback
|
# Use ad-hoc identity as fallback
|
||||||
codesign --force --deep --verbose --options runtime --entitlements LuckyWorld.entitlements --sign - --timestamp "$APP_PATH"
|
codesign --force --deep --verbose --options runtime --entitlements LuckyWorld.entitlements --sign - --timestamp "$APP_PATH"
|
||||||
echo "SIGNED=adhoc" >> "$GITHUB_ENV"
|
echo "SIGNED=adhoc" >> "$GITHUB_ENV"
|
||||||
else
|
else
|
||||||
echo "Using identity: $IDENTITY"
|
echo "Signing app bundle with Developer ID hash: $IDENTITY_HASH"
|
||||||
|
|
||||||
# Sign the app bundle
|
# Sign the app bundle using the hash
|
||||||
echo "Signing app bundle with Developer ID..."
|
codesign --force --deep --verbose --options runtime --entitlements LuckyWorld.entitlements --sign "$IDENTITY_HASH" --timestamp "$APP_PATH"
|
||||||
codesign --force --deep --verbose --options runtime --entitlements LuckyWorld.entitlements --sign "$IDENTITY" --timestamp "$APP_PATH"
|
|
||||||
echo "SIGNED=identity" >> "$GITHUB_ENV"
|
echo "SIGNED=identity" >> "$GITHUB_ENV"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user