Skip to content

Commit 824f030

Browse files
[CI] Update TestFlight app version on manual uploading (#3659)
1 parent f9b0f89 commit 824f030

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

.github/workflows/testflight.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ on:
99
types: [published]
1010

1111
workflow_dispatch:
12+
inputs:
13+
release:
14+
description: 'Build configuration'
15+
required: true
16+
default: 'Debug'
17+
type: choice
18+
options:
19+
- Debug
20+
- Release
1221

1322
env:
1423
HOMEBREW_NO_INSTALL_CLEANUP: 1
@@ -30,7 +39,7 @@ jobs:
3039
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
3140
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3241
GITHUB_PR_NUM: ${{ github.event.number }}
33-
run: bundle exec fastlane uikit_testflight_build
42+
run: bundle exec fastlane uikit_testflight_build configuration:"${{ github.event.inputs.release }}"
3443
- uses: 8398a7/action-slack@v3
3544
with:
3645
status: ${{ job.status }}

Gemfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ GEM
208208
fastlane
209209
pry
210210
fastlane-plugin-sonarcloud_metric_kit (0.2.1)
211-
fastlane-plugin-stream_actions (0.3.78)
211+
fastlane-plugin-stream_actions (0.3.79)
212212
xctest_list (= 1.2.1)
213213
fastlane-plugin-versioning (0.7.1)
214214
fastlane-sirp (1.0.0)
@@ -459,7 +459,7 @@ DEPENDENCIES
459459
fastlane-plugin-create_xcframework
460460
fastlane-plugin-lizard
461461
fastlane-plugin-sonarcloud_metric_kit
462-
fastlane-plugin-stream_actions (= 0.3.78)
462+
fastlane-plugin-stream_actions (= 0.3.79)
463463
fastlane-plugin-versioning
464464
faye-websocket
465465
jazzy

fastlane/Fastfile

+18-1
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,31 @@ lane :match_me do |options|
273273
end
274274

275275
desc 'Builds the latest version of Demo app and uploads it to TestFlight'
276-
lane :uikit_testflight_build do
276+
lane :uikit_testflight_build do |options|
277+
is_manual_upload = is_localhost || !options[:configuration].to_s.empty?
278+
configuration = options[:configuration].to_s.empty? ? 'Release' : options[:configuration]
279+
277280
match_me
281+
282+
sdk_version = get_sdk_version_from_environment
283+
app_version =
284+
if is_manual_upload
285+
major, minor, _patch = sdk_version.split('.').map(&:to_i)
286+
minor += 1
287+
"#{major}.#{minor}.0"
288+
else
289+
sdk_version
290+
end
291+
UI.important("[TestFlight] Uploading DemoApp version: #{app_version}")
292+
278293
testflight_build(
279294
api_key: appstore_api_key,
280295
xcode_project: xcode_project,
281296
sdk_target: 'StreamChat',
282297
app_target: 'DemoApp',
298+
app_version: app_version,
283299
app_identifier: 'io.getstream.iOS.ChatDemoApp',
300+
configuration: configuration,
284301
extensions: ['DemoShare']
285302
)
286303
end

fastlane/Pluginfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
gem 'fastlane-plugin-versioning'
66
gem 'fastlane-plugin-create_xcframework'
77
gem 'fastlane-plugin-sonarcloud_metric_kit'
8-
gem 'fastlane-plugin-stream_actions', '0.3.78'
8+
gem 'fastlane-plugin-stream_actions', '0.3.79'

0 commit comments

Comments
 (0)