Skip to content

Commit ae8798b

Browse files
authored
Update ios.yml
1 parent 9bbff34 commit ae8798b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/ios.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,35 @@ jobs:
2121
token: ${{secrets.GH_PAT}}
2222
submodules: 'recursive'
2323

24+
- name: Install the Apple certificate and provisioning profile
25+
env:
26+
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
27+
P12_PASSWORD: ${{ secrets.APPLE_P12_PASSWORD }}
28+
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.APPLE_PROVISION_PROFILE_BASE64 }}
29+
KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
30+
run: |
31+
# create variables
32+
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
33+
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
34+
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
35+
36+
# import certificate and provisioning profile from secrets
37+
echo -n "$APPLE_CERT_BASE64" | base64 --decode -o $CERTIFICATE_PATH
38+
echo -n "$APPLE_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
39+
40+
# create temporary keychain
41+
security create-keychain -p "$APPLE_KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
42+
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
43+
security unlock-keychain -p "$APPLE_KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
44+
45+
# import certificate to keychain
46+
security import $CERTIFICATE_PATH -P "$APPLE_P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
47+
security list-keychain -d user -s $KEYCHAIN_PATH
48+
49+
# apply provisioning profile
50+
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
51+
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
52+
2453
- name: Set Up Node.js
2554
uses: actions/setup-node@v2
2655
with:

0 commit comments

Comments
 (0)