Skip to content

Commit c69c3b9

Browse files
committed
Switch to using an API key for interactions with AppStoreConnect while on CI; update fastlane and dependencies
1 parent b369ce6 commit c69c3b9

File tree

3 files changed

+47
-36
lines changed

3 files changed

+47
-36
lines changed

.github/workflows/release-alpha.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,9 @@ jobs:
9090
- name: Build Ad-hoc release and send it to Diawi
9191
run: bundle exec fastlane alpha
9292
env:
93-
# Automatically bypass 2FA upgrade if possible on Apple account.
94-
SPACESHIP_SKIP_2FA_UPGRADE: true
95-
APPLE_ID: ${{ secrets.FASTLANE_USER }}
96-
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
97-
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
93+
APPSTORECONNECT_KEY_ID: ${{ secrets.APPSTORECONNECT_KEY_ID }}
94+
APPSTORECONNECT_KEY_ISSUER_ID: ${{ secrets.APPSTORECONNECT_KEY_ISSUER_ID }}
95+
APPSTORECONNECT_KEY_CONTENT: ${{ secrets.APPSTORECONNECT_KEY_CONTENT }}
9896
DIAWI_API_TOKEN: ${{ secrets.DIAWI_API_TOKEN }}
9997
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
10098

Gemfile.lock

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ GEM
33
specs:
44
CFPropertyList (3.0.5)
55
rexml
6-
activesupport (6.1.6.1)
6+
activesupport (6.1.7)
77
concurrent-ruby (~> 1.0, >= 1.0.2)
88
i18n (>= 1.6, < 2)
99
minitest (>= 5.1)
@@ -17,20 +17,20 @@ GEM
1717
artifactory (3.0.15)
1818
atomos (0.1.3)
1919
aws-eventstream (1.2.0)
20-
aws-partitions (1.621.0)
21-
aws-sdk-core (3.134.0)
20+
aws-partitions (1.657.0)
21+
aws-sdk-core (3.166.0)
2222
aws-eventstream (~> 1, >= 1.0.2)
23-
aws-partitions (~> 1, >= 1.525.0)
24-
aws-sigv4 (~> 1.1)
23+
aws-partitions (~> 1, >= 1.651.0)
24+
aws-sigv4 (~> 1.5)
2525
jmespath (~> 1, >= 1.6.1)
26-
aws-sdk-kms (1.58.0)
27-
aws-sdk-core (~> 3, >= 3.127.0)
26+
aws-sdk-kms (1.59.0)
27+
aws-sdk-core (~> 3, >= 3.165.0)
2828
aws-sigv4 (~> 1.1)
29-
aws-sdk-s3 (1.114.0)
30-
aws-sdk-core (~> 3, >= 3.127.0)
29+
aws-sdk-s3 (1.117.1)
30+
aws-sdk-core (~> 3, >= 3.165.0)
3131
aws-sdk-kms (~> 1)
3232
aws-sigv4 (~> 1.4)
33-
aws-sigv4 (1.5.1)
33+
aws-sigv4 (1.5.2)
3434
aws-eventstream (~> 1, >= 1.0.2)
3535
babosa (1.0.4)
3636
claide (1.1.0)
@@ -85,9 +85,9 @@ GEM
8585
dotenv (2.8.1)
8686
emoji_regex (3.2.3)
8787
escape (0.0.4)
88-
ethon (0.15.0)
88+
ethon (0.16.0)
8989
ffi (>= 1.15.0)
90-
excon (0.92.4)
90+
excon (0.93.1)
9191
faraday (1.10.2)
9292
faraday-em_http (~> 1.0)
9393
faraday-em_synchrony (~> 1.0)
@@ -117,7 +117,7 @@ GEM
117117
faraday_middleware (1.2.0)
118118
faraday (~> 1.0)
119119
fastimage (2.2.6)
120-
fastlane (2.209.1)
120+
fastlane (2.210.1)
121121
CFPropertyList (>= 2.3, < 4.0.0)
122122
addressable (>= 2.8, < 3.0.0)
123123
artifactory (~> 3.0)
@@ -159,17 +159,18 @@ GEM
159159
fastlane-plugin-brew (0.1.1)
160160
fastlane-plugin-diawi (2.1.0)
161161
rest-client (>= 2.0.0)
162-
fastlane-plugin-sentry (1.12.2)
162+
fastlane-plugin-sentry (1.14.0)
163+
os (~> 1.1, >= 1.1.4)
163164
fastlane-plugin-versioning (0.5.1)
164165
fastlane-plugin-xcodegen (1.1.0)
165166
fastlane-plugin-brew (~> 0.1.1)
166167
ffi (1.15.5)
167168
fourflusher (2.3.1)
168169
fuzzy_match (2.0.4)
169170
gh_inspector (1.1.3)
170-
google-apis-androidpublisher_v3 (0.25.0)
171-
google-apis-core (>= 0.7, < 2.a)
172-
google-apis-core (0.7.0)
171+
google-apis-androidpublisher_v3 (0.31.0)
172+
google-apis-core (>= 0.9.1, < 2.a)
173+
google-apis-core (0.9.1)
173174
addressable (~> 2.5, >= 2.5.1)
174175
googleauth (>= 0.16.2, < 2.a)
175176
httpclient (>= 2.8.1, < 3.a)
@@ -178,27 +179,27 @@ GEM
178179
retriable (>= 2.0, < 4.a)
179180
rexml
180181
webrick
181-
google-apis-iamcredentials_v1 (0.13.0)
182-
google-apis-core (>= 0.7, < 2.a)
183-
google-apis-playcustomapp_v1 (0.10.0)
184-
google-apis-core (>= 0.7, < 2.a)
185-
google-apis-storage_v1 (0.17.0)
186-
google-apis-core (>= 0.7, < 2.a)
182+
google-apis-iamcredentials_v1 (0.16.0)
183+
google-apis-core (>= 0.9.1, < 2.a)
184+
google-apis-playcustomapp_v1 (0.12.0)
185+
google-apis-core (>= 0.9.1, < 2.a)
186+
google-apis-storage_v1 (0.19.0)
187+
google-apis-core (>= 0.9.0, < 2.a)
187188
google-cloud-core (1.6.0)
188189
google-cloud-env (~> 1.0)
189190
google-cloud-errors (~> 1.0)
190191
google-cloud-env (1.6.0)
191192
faraday (>= 0.17.3, < 3.0)
192-
google-cloud-errors (1.2.0)
193-
google-cloud-storage (1.38.0)
193+
google-cloud-errors (1.3.0)
194+
google-cloud-storage (1.44.0)
194195
addressable (~> 2.8)
195196
digest-crc (~> 0.4)
196197
google-apis-iamcredentials_v1 (~> 0.1)
197-
google-apis-storage_v1 (~> 0.17.0)
198+
google-apis-storage_v1 (~> 0.19.0)
198199
google-cloud-core (~> 1.6)
199200
googleauth (>= 0.16.2, < 2.a)
200201
mini_mime (~> 1.0)
201-
googleauth (1.2.0)
202+
googleauth (1.3.0)
202203
faraday (>= 0.17.3, < 3.a)
203204
jwt (>= 1.4, < 3.0)
204205
memoist (~> 0.16)
@@ -214,7 +215,7 @@ GEM
214215
concurrent-ruby (~> 1.0)
215216
jmespath (1.6.1)
216217
json (2.6.2)
217-
jwt (2.4.1)
218+
jwt (2.5.0)
218219
memoist (0.16.2)
219220
mime-types (3.4.1)
220221
mime-types-data (~> 3.2015)
@@ -230,7 +231,7 @@ GEM
230231
nap (1.1.0)
231232
naturally (2.2.1)
232233
netrc (0.11.0)
233-
nokogiri (1.13.8)
234+
nokogiri (1.13.9)
234235
mini_portile2 (~> 2.8.0)
235236
racc (~> 1.4)
236237
optparse (0.1.1)
@@ -302,7 +303,7 @@ GEM
302303
rouge (~> 2.0.7)
303304
xcpretty-travis-formatter (1.0.1)
304305
xcpretty (~> 0.2, >= 0.0.7)
305-
zeitwerk (2.6.0)
306+
zeitwerk (2.6.6)
306307

307308
PLATFORMS
308309
ruby

fastlane/Fastfile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,19 @@ platform :ios do
220220

221221
desc "Download App Store or Ad-Hoc provisioning profiles"
222222
private_lane :build_release do |options|
223-
UI.user_error!("'APPLE_ID' environment variable should be set to use this lane") unless !ENV["APPLE_ID"].to_s.empty?
223+
if is_ci
224+
UI.user_error!("'APPSTORECONNECT_KEY_ID' environment variable should be set to use this lane") unless !ENV["APPSTORECONNECT_KEY_ID"].to_s.empty?
225+
UI.user_error!("'APPSTORECONNECT_KEY_ISSUER_ID' environment variable should be set to use this lane") unless !ENV["APPSTORECONNECT_KEY_ISSUER_ID"].to_s.empty?
226+
UI.user_error!("'APPSTORECONNECT_KEY_CONTENT' environment variable should be set to use this lane") unless !ENV["APPSTORECONNECT_KEY_CONTENT"].to_s.empty?
227+
228+
app_store_connect_api_key(
229+
key_id: ENV["APPSTORECONNECT_KEY_ID"],
230+
issuer_id: ENV["APPSTORECONNECT_KEY_ISSUER_ID"],
231+
key_content: ENV["APPSTORECONNECT_KEY_CONTENT"]
232+
)
233+
else
234+
UI.user_error!("'APPLE_ID' environment variable should be set to use this lane") unless !ENV["APPLE_ID"].to_s.empty?
235+
end
224236

225237
build_number = options[:build_number]
226238
UI.user_error!("'build_number' parameter is missing") unless !build_number.to_s.empty?

0 commit comments

Comments
 (0)