github-desktop/script/setup-macos-keychain
Vanessa Yuen 4a4cd04f96 newline
2018-07-27 17:43:34 -07:00

17 lines
709 B
Bash
Executable file

#!/bin/sh
curl -H "Authorization: token ${DESKTOPBOT_TOKEN}" -H 'Accept: application/vnd.github.v3.raw' -O -L https://api.github.com/repos/desktop/desktop-secrets/contents/developer-id-cert.p12
KEY_CHAIN=mac-build.keychain
security create-keychain -p travis $KEY_CHAIN
security import developer-id-cert.p12 -k $KEY_CHAIN -P $KEY_PASSWORD -T /usr/bin/codesign
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
# set key partition list to avoid UI permission popup that causes hanging at CI
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k travis $KEY_CHAIN