-
Notifications
You must be signed in to change notification settings - Fork 36
161 lines (141 loc) · 5.79 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# Overview
# This GitHub Action automates the build and distribution process for the Haqq Wallet iOS application.
# It builds the project and distributes the IPA to TestFlight.
name: Distribute iOS
on:
workflow_dispatch:
inputs:
IS_DEVELOPMENT:
type: choice
description: IS_DEVELOPMENT
options:
- false
- true
IS_SSS_ENABLED:
type: choice
description: IS_SSS_ENABLED
options:
- true
- false
IS_NFT_ENABLED:
type: choice
description: IS_NFT_ENABLED
options:
- true
- false
STORIES_ENABLED:
type: choice
description: STORIES_ENABLED
options:
- true
- false
BUILD_DESCRIPTION:
required: true
description: Please add a short note for a new build
workflow_call:
inputs:
IS_DEVELOPMENT:
required: true
type: string
IS_SSS_ENABLED:
required: true
type: string
IS_NFT_ENABLED:
required: true
type: string
STORIES_ENABLED:
required: true
type: string
# DEFAULT_BACKEND:
# required: true
# type: string
BUILD_DESCRIPTION:
required: true
type: string
jobs:
build:
name: Distribute iOS app
runs-on: macos-latest
steps:
- name: Show macOS machine infomation
run: uname -a
- name: Checkout code
uses: actions/checkout@v4
- name: Setup NodeJS@18
uses: actions/setup-node@v4
with:
node-version: 18
- name: Set up Ruby 3.2.0
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.0
bundler-cache: true
- name: Cache XCode build
uses: mikehardy/buildcache-action@v2
- name: Setup Fastlane
run: |
bundle install
- name: Install packages
run: yarn install
- name: Install pods
run: cd ios && pod install --repo-update && cd ../
- 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 "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 "HAQQ_BACKEND=${{secrets.HAQQ_BACKEND}}" >> .env
echo "HAQQ_BACKEND_DEV=${{secrets.HAQQ_BACKEND_DEV}}" >> .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
echo "IS_NFT_ENABLED=${{github.event.inputs.IS_NFT_ENABLED}}" >> .env
echo "GOOGLE_PLAY_PACKAGE=${{secrets.GOOGLE_PLAY_PACKAGE}}" >> .env
echo "APPSTORE_APP_ID=${{secrets.APPSTORE_APP_ID}}" >> .env
echo "TURNSTILE_URL=${{secrets.TURNSTILE_URL}}" >> .env
echo "TURNSTILE_SITEKEY=${{secrets.TURNSTILE_SITEKEY}}" >> .env
echo "RECAPTCHA_V2_URL=${{secrets.RECAPTCHA_V2_URL}}" >> .env
echo "RECAPTCHA_V2_SITEKEY=${{secrets.RECAPTCHA_V2_SITEKEY}}" >> .env
echo "HCAPTCHA_URL=${{secrets.HCAPTCHA_URL}}" >> .env
echo "STORIES_ENABLED=${{github.event.inputs.STORIES_ENABLED}}" >> .env
echo "DETOX_MILK_PRIVATE_KEY=${{secrets.DETOX_MILK_PRIVATE_KEY}}" >> .env
echo "DETOX_PROVIDER=${{secrets.DETOX_PROVIDER}}" >> .env
echo "DETOX_CHAIN_ID=${{secrets.DETOX_CHAIN_ID}}" >> .env
echo "MMKV_KEY=${{secrets.MMKV_KEY}}" >> .env
echo "POSTHOG_API_KEY=${{secrets.POSTHOG_API_KEY}}" >> .env
echo "POSTHOG_HOST=${{secrets.POSTHOG_HOST}}" >> .env
- name: Build and Send app to TestFlight
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 }}
BUILD_DESCRIPTION: ${{inputs.BUILD_DESCRIPTION || github.event.inputs.BUILD_DESCRIPTION}}