Validate signing identity import in release workflow before binary signing
This commit is contained in:
1 parent
f98b17f47c
commit
33e64ee892
1 file changed
+4
-1
@@ -195,7 +195,10 @@ jobs:
|
||||
security set-keychain-settings -lut 21600 "$keychain_path"
|
||||
security unlock-keychain -p "$keychain_password" "$keychain_path"
|
||||
security import "$certificate_path" -k "$keychain_path" -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
|
||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$keychain_password" "$keychain_path"
|
||||
if ! security find-identity -v -p codesigning "$keychain_path" | grep -F -- "$APPLE_SIGNING_IDENTITY"; then
|
||||
echo "Signing identity was not imported into the temporary keychain" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
codesign --force --options runtime --timestamp --sign "$APPLE_SIGNING_IDENTITY" --keychain "$keychain_path" "$binary"
|
||||
codesign --verify --strict --verbose=2 "$binary"
|
||||
|
||||
Reference in new issue
Block a user