fix(workflows): simplify macOS build workflow by removing unnecessary certificate downloads and checks
Some checks failed
Test macOS Build Action / test-macos-build (push) Failing after 27m41s
Some checks failed
Test macOS Build Action / test-macos-build (push) Failing after 27m41s
This commit is contained in:
parent
e72864b44d
commit
2e941c671f
@ -109,37 +109,19 @@ jobs:
|
|||||||
security list-keychains -d user -s "$KEYCHAIN_PATH" $(security list-keychains -d user | sed s/\"//g)
|
security list-keychains -d user -s "$KEYCHAIN_PATH" $(security list-keychains -d user | sed s/\"//g)
|
||||||
security default-keychain -s "$KEYCHAIN_PATH"
|
security default-keychain -s "$KEYCHAIN_PATH"
|
||||||
|
|
||||||
# Decode and import certificate
|
# Decode and import developer certificate
|
||||||
echo "$CERTIFICATE_BASE64" | base64 --decode > certificate.p12
|
echo "$CERTIFICATE_BASE64" | base64 --decode > certificate.p12
|
||||||
|
|
||||||
# Download Apple certificates
|
|
||||||
curl -s -o AppleWWDRCAG3.cer https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer
|
|
||||||
curl -s -o DeveloperIDG2.cer https://www.apple.com/certificateauthority/DeveloperIDG2.cer
|
|
||||||
|
|
||||||
# Check certificate formats - for debugging
|
|
||||||
echo "Certificate formats:"
|
|
||||||
file AppleWWDRCAG3.cer
|
|
||||||
file DeveloperIDG2.cer
|
|
||||||
file certificate.p12
|
|
||||||
|
|
||||||
# Import Apple root certificates properly
|
|
||||||
# Apple DER certificates need to be imported with -f der flag
|
|
||||||
echo "Importing Apple WWDRCA certificate..."
|
|
||||||
security import AppleWWDRCAG3.cer -k "$KEYCHAIN_PATH" -T /usr/bin/codesign -f der
|
|
||||||
|
|
||||||
echo "Importing Developer ID certificate..."
|
|
||||||
security import DeveloperIDG2.cer -k "$KEYCHAIN_PATH" -T /usr/bin/codesign -f der
|
|
||||||
|
|
||||||
# Import developer certificate with proper parameters
|
# Import developer certificate with proper parameters
|
||||||
echo "Importing developer certificate..."
|
echo "Importing developer certificate..."
|
||||||
security import certificate.p12 -k "$KEYCHAIN_PATH" -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign -f pkcs12
|
security import certificate.p12 -k "$KEYCHAIN_PATH" -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign
|
||||||
|
|
||||||
# Set partition list - important for automated signing without UI prompts
|
# Set partition list - important for automated signing without UI prompts
|
||||||
security set-key-partition-list -S apple-tool:,apple: -s -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
|
security set-key-partition-list -S apple-tool:,apple: -s -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
|
||||||
|
|
||||||
# Verify certificates were imported correctly
|
# Verify certificates were imported correctly
|
||||||
echo "Listing imported certificates..."
|
echo "Listing imported certificates..."
|
||||||
security find-certificate -a "$KEYCHAIN_PATH"
|
security find-identity -v -p codesigning "$KEYCHAIN_PATH"
|
||||||
|
|
||||||
# Export keychain path and password for later use
|
# Export keychain path and password for later use
|
||||||
echo "KEYCHAIN_PATH=$KEYCHAIN_PATH" >> "$GITHUB_ENV"
|
echo "KEYCHAIN_PATH=$KEYCHAIN_PATH" >> "$GITHUB_ENV"
|
||||||
@ -358,7 +340,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up certificate files
|
# Clean up certificate files
|
||||||
rm -f certificate.p12 AppleWWDRCAG3.cer DeveloperIDG2.cer api_key.p8 || true
|
rm -f certificate.p12 api_key.p8 || true
|
||||||
|
|
||||||
echo "Cleanup complete"
|
echo "Cleanup complete"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user