secretive/.github/scripts/signing.sh

19 lines
933 B
Bash
Raw Normal View History

2020-03-15 01:32:02 +00:00
#!/bin/bash
# Import certificate and private key
echo $SIGNING_DATA | base64 -d -o Signing.p12
security create-keychain -p ci ci.keychain
security default-keychain -s ci.keychain
security list-keychains -s ci.keychain
security import ./Signing.p12 -k ci.keychain -P $SIGNING_PASSWORD -A
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k ci ci.keychain
# Import Profiles
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
2020-03-15 01:50:18 +00:00
echo $HOST_PROFILE_DATA | base64 -d -o Host.provisionprofile
2020-03-15 02:37:31 +00:00
HOST_UUID=`grep UUID -A1 -a Host.provisionprofile | grep -io "[-A-F0-9]\{36\}"`
2020-03-15 01:51:06 +00:00
cp Host.provisionprofile ~/Library/MobileDevice/Provisioning\ Profiles/$HOST_UUID.provisionprofile
echo $AGENT_PROFILE_DATA | base64 -d -o Agent.provisionprofile
2020-03-15 01:50:18 +00:00
AGENT_UUID=`grep UUID -A1 -a Agent.provisionprofile | grep -io "[-A-F0-9]\{36\}"`
cp Agent.provisionprofile ~/Library/MobileDevice/Provisioning\ Profiles/$AGENT_UUID.provisionprofile