-
Notifications
You must be signed in to change notification settings - Fork 36
118 lines (114 loc) · 4.95 KB
/
distribute-ios.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: Distribute iOS app
on:
workflow_dispatch:
inputs:
IS_DEVELOPMENT:
type: choice
description: IS_DEVELOPMENT
options:
- 0
- 1
IS_SSS_ENABLED:
type: choice
description: IS_SSS_ENABLED
options:
- false
- true
workflow_call:
inputs:
IS_DEVELOPMENT:
required: true
type: string
IS_SSS_ENABLED:
required: true
type: string
jobs:
build:
name: Build and distribute iOS app
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
# - uses: ruby/setup-ruby@v1
# with:
# ruby-version: '3.1'
# bundler-cache: true
# - uses: actions/cache@v3
# with:
# path: ios/Pods
# key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
# restore-keys: |
# ${{ runner.os }}-pods-
# - uses: actions/cache@v3
# with:
# path: '**/node_modules'
# key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
# - uses: actions/cache@v3
# with:
# path: vendor/bundle
# key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
# restore-keys: |
# ${{ runner.os }}-gems-
- name: Install Fastlane
run: |
bundle install
- name: Install packages
run: yarn install --frozen-lockfile
- name: Install pods
run: cd ios && pod install
- name: Git init
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github actions"
- name: Decode secrets
run: |
echo ${{secrets.GOOGLE_SERVICE_IOS}} | base64 -d > ios/GoogleService-Info.plist
echo "PROVIDER_NETWORK=${{secrets.PROVIDER_NETWORK}}" >> .env
echo "PROVIDER_WS_NETWORK=${{secrets.PROVIDER_WS_NETWORK}}" >> .env
echo "PROVIDER_CHAIN_ID=${{secrets.PROVIDER_CHAIN_ID}}" >> .env
echo "SENTRY_DSN=${{secrets.SENTRY_DSN}}" >> .env
echo "NETWORK_EXPLORER=${{secrets.NETWORK_EXPLORER}}" >> .env
echo "PATTERNS_SOURCE=${{secrets.PATTERNS_SOURCE}}" >> .env
echo "ENVIRONMENT=distribution" >> .env
echo "IS_DEVELOPMENT=${{github.event.inputs.IS_DEVELOPMENT}}" >> .env
echo "WALLET_CONNECT_PROJECT_ID=${{secrets.WALLET_CONNECT_PROJECT_ID}}" >> .env
echo "WALLET_CONNECT_RELAY_URL=${{secrets.WALLET_CONNECT_RELAY_URL}}" >> .env
echo "WEB3AUTH_CLIENT_ID=${{secrets.WEB3AUTH_CLIENT_ID}}" >> .env
echo "HCAPTCHA_SITE_KEY=${{secrets.HCAPTCHA_SITE_KEY}}" >> .env
echo "GOOGLE_SIGNIN_WEB_CLIENT_ID=${{secrets.GOOGLE_SIGNIN_WEB_CLIENT_ID}}" >> .env
echo "CUSTOM_JWT_TOKEN=${{secrets.CUSTOM_JWT_TOKEN}}" >> .env
echo "SSS_GOOGLE_IOS=${{secrets.SSS_GOOGLE_IOS}}" >> .env
echo "SSS_GOOGLE_ANDROID=${{secrets.SSS_GOOGLE_ANDROID}}" >> .env
echo "SSS_APPLE=${{secrets.SSS_APPLE}}" >> .env
echo "SSS_CUSTOM=${{secrets.SSS_CUSTOM}}" >> .env
echo "METADATA_URL=${{secrets.METADATA_URL}}" >> .env
echo "GENERATE_SHARES_URL=${{secrets.GENERATE_SHARES_URL}}" >> .env
echo "PUSH_NOTIFICATIONS_URL=${{secrets.PUSH_NOTIFICATIONS_URL}}" >> .env
echo "AIRDROP_TESTEDGE2_URL=${{secrets.AIRDROP_TESTEDGE2_URL}}" >> .env
echo "AIRDROP_MAINNET_URL=${{secrets.AIRDROP_MAINNET_URL}}" >> .env
echo "HAQQ_BACKEND=${{secrets.HAQQ_BACKEND}}" >> .env
echo "ADJUST_TOKEN=${{secrets.ADJUST_TOKEN}}" >> .env
echo "ADJUST_ENVIRONMENT=${{secrets.ADJUST_ENVIRONMENT}}" >> .env
echo "IS_SSS_ENABLED=${{github.event.inputs.IS_SSS_ENABLED}}" >> .env
- name: Execute build
run: |
eval "$(ssh-agent -s)"
ssh-add - <<< "${MATCH_DEPLOY_KEY}"
bundle exec fastlane ios distribute
env:
DEVELOPER_APP_IDENTIFIER: ${{ secrets.IOS_IDENTIFIER }}
GIT_AUTHORIZATION: ${{ secrets.GIT_AUTHORIZATION }}
APP_STORE_CONNECT_TEAM_ID: ${{ secrets.APP_STORE_CONNECT_TEAM_ID }}
DEVELOPER_PORTAL_TEAM_ID: ${{ secrets.DEVELOPER_PORTAL_TEAM_ID }}
MATCH_DEPLOY_KEY: ${{ secrets.MATCH_DEPLOY_KEY }}
TEMP_KEYCHAIN_USER: ${{ secrets.TEMP_KEYCHAIN_USER }}
TEMP_KEYCHAIN_PASSWORD: ${{ secrets.TEMP_KEYCHAIN_PASSWORD }}
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }}
APPLE_KEY_CONTENT: ${{ secrets.APPLE_KEY_CONTENT }}
FASTLANE_PASSWORD: ${{ secrets.APPLE_FASTLANE_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
DEVELOPER_APP_ID: ${{ secrets.DEVELOPER_APP_ID }}
PROVISIONING_PROFILE_SPECIFIER: ${{ secrets.PROVISIONING_PROFILE_SPECIFIER }}