-
-
Notifications
You must be signed in to change notification settings - Fork 67
60 lines (51 loc) · 2.63 KB
/
publish-beta.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Publish Beta
on:
workflow_dispatch:
jobs:
publish:
name: Publish
runs-on: macos-14
steps:
- name: Check out Git repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup signing environment
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64_EXPO }}
KEYCHAIN_PASSWORD: "CI_PASSWORD"
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
sudo mkdir -p /Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
sudo cp $PP_PATH /Library/MobileDevice/Provisioning\ Profiles
- name: Build and publish beta
env:
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_KEY_ID_EXPO }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_KEY_CONTENTS_EXPO }}
APP_STORE_CONNECT_API_KEY_IS_KEY_CONTENT_BASE64: true
APP_STORE_CONNECT_API_KEY_DURATION: 1200
APP_STORE_CONNECT_API_KEY_IN_HOUSE: false
run: fastlane beta \
keyID:"${{ secrets.APP_STORE_KEY_ID_EXPO }}" \
issuerID:"${{ secrets.APP_STORE_ISSUER_ID }}" \
keyContents:"${{ secrets.APP_STORE_KEY_CONTENTS_EXPO }}" \
codeSign64:"${{ secrets.CODE_SIGN_64 }}" \
profileName64:"${{ secrets.PROFILE_NAME_64_EXPO }}"