Skip to content

Commit 7ab080d

Browse files
feat: [ZN-550] iOS AdHoc builds
1 parent 5e4420f commit 7ab080d

File tree

12 files changed

+331
-114
lines changed

12 files changed

+331
-114
lines changed

.github/workflows/staging_build_android.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: Android Staging Build
22

3-
# Manual deployment
4-
on: workflow_dispatch
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
56

67
jobs:
78
build-and-publish:
@@ -56,7 +57,7 @@ jobs:
5657
git config user.email "<>"
5758
5859
- name: Build and Upload to Firebase
59-
uses: maierj/fastlane-action@v3.0.0
60+
uses: maierj/fastlane-action@v3.1.0
6061
with:
6162
lane: 'android staging'
6263
env:
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: iOS Staging Build
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
6+
7+
jobs:
8+
build-and-publish:
9+
runs-on: macos-latest
10+
environment: staging
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-node@v4
15+
with:
16+
cache: 'yarn'
17+
node-version-file: .node-version
18+
19+
- name: Setup Ruby
20+
uses: ruby/setup-ruby@v1
21+
with:
22+
ruby-version: '3.2'
23+
bundler-cache: true
24+
25+
- name: Make .env file
26+
uses: SpicyPizza/[email protected]
27+
with:
28+
envkey_BASE_API_URL: ${{ vars.BASE_API_URL }}
29+
envkey_AUTH_STORAGE_KEY: ${{ vars.AUTH_STORAGE_KEY }}
30+
envkey_DEFAULT_LOCALE: ${{ vars.DEFAULT_LOCALE }}
31+
envkey_MOCK_API: ${{ vars.MOCK_API }}
32+
33+
# Update Google Service File
34+
# - name: Setup Firebase File
35+
# run: echo "${{ secrets.IOS_FIREBASE_FILE }}" > ./ios/GoogleService-Info.plist
36+
37+
# Setup Firebase Service Account file
38+
# - name: Setup Service Account Credential Files
39+
# run: echo "${{secrets.FIREBASE_SERVICE_ACCOUNT_JSON}}" > "${{ github.workspace }}/firebase-service-account.json"
40+
41+
- name: Install
42+
run: yarn install --frozen-lockfile
43+
44+
- name: Cache CocoaPods
45+
id: cache-cocoapods
46+
uses: actions/cache@v4
47+
with:
48+
path: ios/Pods
49+
key: ${{ runner.os }}-${{ runner.arch }}-pods-${{ hashFiles('ios/Podfile.lock') }}
50+
restore-keys: |
51+
${{ runner.os }}-${{ runner.arch }}-pods-
52+
53+
- name: Install CocoaPods
54+
run: cd ios ; pod install ; cd -
55+
56+
- name: Setup Git Config
57+
run: |
58+
git config user.name "GitHub Actions Bot"
59+
git config user.email "<>"
60+
61+
- name: Build and Upload to Firebase
62+
uses: maierj/[email protected]
63+
with:
64+
lane: 'ios staging'
65+
env:
66+
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
67+
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
68+
# FASTLANE_USER & FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD required if deploying to testflight -> lane: 'ios beta'
69+
# FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
70+
# FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
71+
FIREBASE_IOS_APP_ID: ${{ secrets.FIREBASE_IOS_APP_ID }}
72+
# Not required if you define service_credentials_file in the Fastfile
73+
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy app to staging
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
lint-and-test:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-node@v4
15+
with:
16+
cache: 'yarn'
17+
node-version-file: .node-version
18+
19+
- name: Install
20+
run: yarn install --frozen-lockfile
21+
22+
- name: Lint
23+
run: yarn lint
24+
25+
- name: Test
26+
run: yarn test
27+
28+
e2e-ios:
29+
needs: lint-and-test
30+
uses: ./.github/workflows/e2e_ios.yml
31+
32+
e2e-android:
33+
needs: lint-and-test
34+
uses: ./.github/workflows/e2e_android.yml
35+
36+
deploy-ios:
37+
needs: e2e-ios
38+
secrets: inherit
39+
uses: ./.github/workflows/staging_build_ios.yml
40+
41+
deploy-android:
42+
needs: e2e-android
43+
secrets: inherit
44+
uses: ./.github/workflows/staging_build_android.yml

Gemfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
source "https://rubygems.org"
22

3-
gem 'fastlane'
3+
gem "fastlane"
44

5-
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
5+
plugins_path = File.join(File.dirname(__FILE__), "fastlane", "Pluginfile")
66
eval_gemfile(plugins_path) if File.exist?(plugins_path)
7-

Gemfile.lock

Lines changed: 52 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
CFPropertyList (3.0.6)
4+
CFPropertyList (3.0.7)
5+
base64
6+
nkf
57
rexml
6-
addressable (2.8.5)
8+
addressable (2.8.6)
79
public_suffix (>= 2.0.2, < 6.0)
8-
artifactory (3.0.15)
10+
artifactory (3.0.17)
911
atomos (0.1.3)
10-
aws-eventstream (1.2.0)
11-
aws-partitions (1.839.0)
12-
aws-sdk-core (3.185.1)
13-
aws-eventstream (~> 1, >= 1.0.2)
12+
aws-eventstream (1.3.0)
13+
aws-partitions (1.918.0)
14+
aws-sdk-core (3.192.1)
15+
aws-eventstream (~> 1, >= 1.3.0)
1416
aws-partitions (~> 1, >= 1.651.0)
15-
aws-sigv4 (~> 1.5)
17+
aws-sigv4 (~> 1.8)
1618
jmespath (~> 1, >= 1.6.1)
17-
aws-sdk-kms (1.72.0)
18-
aws-sdk-core (~> 3, >= 3.184.0)
19+
aws-sdk-kms (1.79.0)
20+
aws-sdk-core (~> 3, >= 3.191.0)
1921
aws-sigv4 (~> 1.1)
20-
aws-sdk-s3 (1.136.0)
21-
aws-sdk-core (~> 3, >= 3.181.0)
22+
aws-sdk-s3 (1.147.0)
23+
aws-sdk-core (~> 3, >= 3.192.0)
2224
aws-sdk-kms (~> 1)
23-
aws-sigv4 (~> 1.6)
24-
aws-sigv4 (1.6.0)
25+
aws-sigv4 (~> 1.8)
26+
aws-sigv4 (1.8.0)
2527
aws-eventstream (~> 1, >= 1.0.2)
2628
babosa (1.0.4)
29+
base64 (0.2.0)
2730
claide (1.1.0)
2831
colored (1.2)
2932
colored2 (3.1.2)
@@ -32,11 +35,10 @@ GEM
3235
declarative (0.0.20)
3336
digest-crc (0.6.5)
3437
rake (>= 12.0.0, < 14.0.0)
35-
domain_name (0.5.20190701)
36-
unf (>= 0.0.5, < 1.0.0)
38+
domain_name (0.6.20240107)
3739
dotenv (2.8.1)
3840
emoji_regex (3.2.3)
39-
excon (0.104.0)
41+
excon (0.110.0)
4042
faraday (1.10.3)
4143
faraday-em_http (~> 1.0)
4244
faraday-em_synchrony (~> 1.0)
@@ -65,15 +67,15 @@ GEM
6567
faraday-retry (1.0.3)
6668
faraday_middleware (1.2.0)
6769
faraday (~> 1.0)
68-
fastimage (2.2.7)
69-
fastlane (2.216.0)
70+
fastimage (2.3.1)
71+
fastlane (2.220.0)
7072
CFPropertyList (>= 2.3, < 4.0.0)
7173
addressable (>= 2.8, < 3.0.0)
7274
artifactory (~> 3.0)
7375
aws-sdk-s3 (~> 1.0)
7476
babosa (>= 1.0.3, < 2.0.0)
7577
bundler (>= 1.12.0, < 3.0.0)
76-
colored
78+
colored (~> 1.2)
7779
commander (~> 4.6)
7880
dotenv (>= 2.1.1, < 3.0.0)
7981
emoji_regex (>= 0.1, < 4.0)
@@ -85,6 +87,7 @@ GEM
8587
gh_inspector (>= 1.1.2, < 2.0.0)
8688
google-apis-androidpublisher_v3 (~> 0.3)
8789
google-apis-playcustomapp_v1 (~> 0.1)
90+
google-cloud-env (>= 1.6.0, < 2.0.0)
8891
google-cloud-storage (~> 1.31)
8992
highline (~> 2.0)
9093
http-cookie (~> 1.0.5)
@@ -93,10 +96,10 @@ GEM
9396
mini_magick (>= 4.9.4, < 5.0.0)
9497
multipart-post (>= 2.0.0, < 3.0.0)
9598
naturally (~> 2.2)
96-
optparse (~> 0.1.1)
99+
optparse (>= 0.1.1, < 1.0.0)
97100
plist (>= 3.1.0, < 4.0.0)
98101
rubyzip (>= 2.0.0, < 3.0.0)
99-
security (= 0.1.3)
102+
security (= 0.1.5)
100103
simctl (~> 1.6.3)
101104
terminal-notifier (>= 2.0.0, < 3.0.0)
102105
terminal-table (~> 3)
@@ -105,41 +108,43 @@ GEM
105108
word_wrap (~> 1.0.0)
106109
xcodeproj (>= 1.13.0, < 2.0.0)
107110
xcpretty (~> 0.3.0)
108-
xcpretty-travis-formatter (>= 0.0.3)
109-
fastlane-plugin-firebase_app_distribution (0.7.4)
111+
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
112+
fastlane-plugin-firebase_app_distribution (0.9.0)
110113
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
114+
google-apis-firebaseappdistribution_v1alpha (~> 0.2.0)
111115
fastlane-plugin-increment_version_code (0.4.3)
112116
gh_inspector (1.1.3)
113-
google-apis-androidpublisher_v3 (0.51.0)
117+
google-apis-androidpublisher_v3 (0.54.0)
114118
google-apis-core (>= 0.11.0, < 2.a)
115-
google-apis-core (0.11.1)
119+
google-apis-core (0.11.3)
116120
addressable (~> 2.5, >= 2.5.1)
117121
googleauth (>= 0.16.2, < 2.a)
118122
httpclient (>= 2.8.1, < 3.a)
119123
mini_mime (~> 1.0)
120124
representable (~> 3.0)
121125
retriable (>= 2.0, < 4.a)
122126
rexml
123-
webrick
124127
google-apis-firebaseappdistribution_v1 (0.3.0)
125128
google-apis-core (>= 0.11.0, < 2.a)
129+
google-apis-firebaseappdistribution_v1alpha (0.2.0)
130+
google-apis-core (>= 0.11.0, < 2.a)
126131
google-apis-iamcredentials_v1 (0.17.0)
127132
google-apis-core (>= 0.11.0, < 2.a)
128133
google-apis-playcustomapp_v1 (0.13.0)
129134
google-apis-core (>= 0.11.0, < 2.a)
130-
google-apis-storage_v1 (0.19.0)
131-
google-apis-core (>= 0.9.0, < 2.a)
132-
google-cloud-core (1.6.0)
133-
google-cloud-env (~> 1.0)
135+
google-apis-storage_v1 (0.31.0)
136+
google-apis-core (>= 0.11.0, < 2.a)
137+
google-cloud-core (1.7.0)
138+
google-cloud-env (>= 1.0, < 3.a)
134139
google-cloud-errors (~> 1.0)
135140
google-cloud-env (1.6.0)
136141
faraday (>= 0.17.3, < 3.0)
137-
google-cloud-errors (1.3.1)
138-
google-cloud-storage (1.44.0)
142+
google-cloud-errors (1.4.0)
143+
google-cloud-storage (1.47.0)
139144
addressable (~> 2.8)
140145
digest-crc (~> 0.4)
141146
google-apis-iamcredentials_v1 (~> 0.1)
142-
google-apis-storage_v1 (~> 0.19.0)
147+
google-apis-storage_v1 (~> 0.31.0)
143148
google-cloud-core (~> 1.6)
144149
googleauth (>= 0.16.2, < 2.a)
145150
mini_mime (~> 1.0)
@@ -154,19 +159,21 @@ GEM
154159
domain_name (~> 0.5)
155160
httpclient (2.8.3)
156161
jmespath (1.6.2)
157-
json (2.6.3)
158-
jwt (2.7.1)
162+
json (2.7.2)
163+
jwt (2.8.1)
164+
base64
159165
mini_magick (4.12.0)
160166
mini_mime (1.1.5)
161167
multi_json (1.15.0)
162-
multipart-post (2.3.0)
168+
multipart-post (2.4.0)
163169
nanaimo (0.3.0)
164170
naturally (2.2.1)
165-
optparse (0.1.1)
171+
nkf (0.2.0)
172+
optparse (0.5.0)
166173
os (1.1.4)
167-
plist (3.7.0)
168-
public_suffix (5.0.3)
169-
rake (13.0.6)
174+
plist (3.7.1)
175+
public_suffix (5.0.5)
176+
rake (13.2.1)
170177
representable (3.2.0)
171178
declarative (< 0.1.0)
172179
trailblazer-option (>= 0.1.1, < 0.2.0)
@@ -176,8 +183,8 @@ GEM
176183
rouge (2.0.7)
177184
ruby2_keywords (0.0.5)
178185
rubyzip (2.3.2)
179-
security (0.1.3)
180-
signet (0.18.0)
186+
security (0.1.5)
187+
signet (0.19.0)
181188
addressable (~> 2.8)
182189
faraday (>= 0.17.5, < 3.a)
183190
jwt (>= 1.5, < 3.0)
@@ -190,17 +197,13 @@ GEM
190197
unicode-display_width (>= 1.1.1, < 3)
191198
trailblazer-option (0.1.2)
192199
tty-cursor (0.7.1)
193-
tty-screen (0.8.1)
200+
tty-screen (0.8.2)
194201
tty-spinner (0.9.3)
195202
tty-cursor (~> 0.7)
196203
uber (0.1.0)
197-
unf (0.1.4)
198-
unf_ext
199-
unf_ext (0.0.8.2)
200204
unicode-display_width (2.5.0)
201-
webrick (1.8.1)
202205
word_wrap (1.0.0)
203-
xcodeproj (1.23.0)
206+
xcodeproj (1.24.0)
204207
CFPropertyList (>= 2.3.3, < 4.0)
205208
atomos (~> 0.1.3)
206209
claide (>= 1.0.2, < 2.0)

0 commit comments

Comments
 (0)