fix(macos): correctly clean up keychain (#1075)

This commit is contained in:
Baptiste Augrain 2022-05-07 17:29:18 +02:00 committed by GitHub
parent e9ea41fcfa
commit 70082e0f0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,7 +80,7 @@ jobs:
cd "VSCode-darwin-${VSCODE_ARCH}"
export CERTIFICATE_P12=VSCodium.p12
echo $CERTIFICATE_OSX_P12 | base64 --decode > $CERTIFICATE_P12
export KEYCHAIN=build.keychain
export KEYCHAIN=$RUNNER_TEMP/build.keychain
security create-keychain -p mysecretpassword $KEYCHAIN
security default-keychain -s $KEYCHAIN
security unlock-keychain -p mysecretpassword $KEYCHAIN
@ -107,6 +107,11 @@ jobs:
GITHUB_USERNAME: ${{ github.repository_owner }}
- name: Clean up keychain
if: ${{ always() }}
if: always()
run: |
security delete-keychain build.keychain
KEYCHAIN=$RUNNER_TEMP/build.keychain
if [ -f "$KEYCHAIN" ];
then
security delete-keychain $KEYCHAIN
fi