Skip to content

[CI] Update TestFlight app version on manual uploading #3659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/testflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ on:
types: [published]

workflow_dispatch:
inputs:
release:
description: 'Build configuration'
required: true
default: 'Debug'
type: choice
options:
- Debug
- Release

env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
Expand All @@ -30,7 +39,7 @@ jobs:
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_NUM: ${{ github.event.number }}
run: bundle exec fastlane uikit_testflight_build
run: bundle exec fastlane uikit_testflight_build configuration:"${{ github.event.inputs.release }}"
- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ GEM
fastlane
pry
fastlane-plugin-sonarcloud_metric_kit (0.2.1)
fastlane-plugin-stream_actions (0.3.78)
fastlane-plugin-stream_actions (0.3.79)
xctest_list (= 1.2.1)
fastlane-plugin-versioning (0.7.1)
fastlane-sirp (1.0.0)
Expand Down Expand Up @@ -459,7 +459,7 @@ DEPENDENCIES
fastlane-plugin-create_xcframework
fastlane-plugin-lizard
fastlane-plugin-sonarcloud_metric_kit
fastlane-plugin-stream_actions (= 0.3.78)
fastlane-plugin-stream_actions (= 0.3.79)
fastlane-plugin-versioning
faye-websocket
jazzy
Expand Down
19 changes: 18 additions & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,31 @@ lane :match_me do |options|
end

desc 'Builds the latest version of Demo app and uploads it to TestFlight'
lane :uikit_testflight_build do
lane :uikit_testflight_build do |options|
is_manual_upload = is_localhost || !options[:configuration].to_s.empty?
configuration = options[:configuration].to_s.empty? ? 'Release' : options[:configuration]

match_me

sdk_version = get_sdk_version_from_environment
app_version =
if is_manual_upload
major, minor, _patch = sdk_version.split('.').map(&:to_i)
minor += 1
"#{major}.#{minor}.0"
else
sdk_version
end
UI.important("[TestFlight] Uploading DemoApp version: #{app_version}")

testflight_build(
api_key: appstore_api_key,
xcode_project: xcode_project,
sdk_target: 'StreamChat',
app_target: 'DemoApp',
app_version: app_version,
app_identifier: 'io.getstream.iOS.ChatDemoApp',
configuration: configuration,
extensions: ['DemoShare']
)
end
Expand Down
2 changes: 1 addition & 1 deletion fastlane/Pluginfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
gem 'fastlane-plugin-versioning'
gem 'fastlane-plugin-create_xcframework'
gem 'fastlane-plugin-sonarcloud_metric_kit'
gem 'fastlane-plugin-stream_actions', '0.3.78'
gem 'fastlane-plugin-stream_actions', '0.3.79'
Loading