Skip to content

Commit cd31fa1

Browse files
committed
Add appstoreconnect api key to CI
1 parent 851e607 commit cd31fa1

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ jobs:
4545
4646
- name: Run Fastlane Install
4747
run: |
48-
tuist install
49-
bundle exec fastlane upload_dsym_to_sentry
5048
bundle exec fastlane upload_oneoff
5149
env:
50+
APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY }}
5251
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
5352
FASTLANE_TEAM_ID: ${{ secrets.FASTLANE_TEAM_ID }}
5453
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}

Fastlane/Fastfile

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,24 @@ platform :ios do
226226

227227
desc "Uploads app to TestFlight"
228228
lane :upload_app_to_testflight do
229-
app_store_connect_api_key(
230-
key_id: "X36R58TMRJ",
231-
issuer_id: "814e488e-06ba-40ba-a16c-a63e7164023f",
232-
key_filepath: "Fastlane/AuthKey_X36R58TMRJ.p8"
233-
)
229+
key_id = "X36R58TMRJ"
230+
issuer_id = "814e488e-06ba-40ba-a16c-a63e7164023f"
231+
232+
if ENV['CI']
233+
key_content = ENV['APP_STORE_CONNECT_API_KEY']
234+
app_store_connect_api_key(
235+
key_id: key_id,
236+
issuer_id: issuer_id,
237+
key_content: key_content
238+
)
239+
else
240+
key_filepath = "Fastlane/AuthKey_X36R58TMRJ.p8"
241+
app_store_connect_api_key(
242+
key_id: key_id,
243+
issuer_id: issuer_id,
244+
key_filepath: key_filepath
245+
)
246+
end
234247

235248
version = get_xcconfig_value(path: 'Configs/App.xcconfig', name: 'MARKETING_VERSION')
236249
build = get_xcconfig_value(path: 'Configs/App.xcconfig', name: 'CURRENT_PROJECT_VERSION')

0 commit comments

Comments
 (0)