github-desktop/script/setup-macos-keychain

20 lines
626 B
Text
Raw Normal View History

2016-06-16 22:17:50 +00:00
#!/bin/sh
2023-06-20 15:20:19 +00:00
set -e
2016-06-16 22:17:50 +00:00
2023-06-20 14:34:00 +00:00
base64 -D <<<"$APPLE_APPLICATION_CERT" > "$RUNNER_TEMP/cert.p12"
2016-06-16 22:17:50 +00:00
2017-09-12 16:18:38 +00:00
KEY_CHAIN=mac-build.keychain
security create-keychain -p travis $KEY_CHAIN
2023-06-20 14:34:00 +00:00
security import "$RUNNER_TEMP/cert.p12" -k $KEY_CHAIN -P $KEY_PASSWORD -T /usr/bin/codesign
2017-09-12 16:18:38 +00:00
security list-keychain -s $KEY_CHAIN
security unlock-keychain -p travis $KEY_CHAIN
security set-keychain-settings -t 3600 -u $KEY_CHAIN
security default-keychain -s $KEY_CHAIN
2018-07-27 04:11:45 +00:00
2018-07-27 05:08:30 +00:00
# set key partition list to avoid UI permission popup that causes hanging at CI
2018-07-28 00:28:19 +00:00
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k travis $KEY_CHAIN
2018-07-28 00:43:34 +00:00
2023-06-20 14:34:00 +00:00
rm "$RUNNER_TEMP/cert.p12"