Skip to content

Commit f793420

Browse files
Update release pipeline (#316)
1 parent 718f2ca commit f793420

File tree

3 files changed

+32
-59
lines changed

3 files changed

+32
-59
lines changed

Gemfile.lock

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ GEM
1717
ast (2.4.2)
1818
atomos (0.1.3)
1919
aws-eventstream (1.2.0)
20-
aws-partitions (1.751.0)
21-
aws-sdk-core (3.171.0)
20+
aws-partitions (1.766.0)
21+
aws-sdk-core (3.173.0)
2222
aws-eventstream (~> 1, >= 1.0.2)
2323
aws-partitions (~> 1, >= 1.651.0)
2424
aws-sigv4 (~> 1.5)
2525
jmespath (~> 1, >= 1.6.1)
26-
aws-sdk-kms (1.63.0)
26+
aws-sdk-kms (1.64.0)
2727
aws-sdk-core (~> 3, >= 3.165.0)
2828
aws-sigv4 (~> 1.1)
29-
aws-sdk-s3 (1.121.0)
29+
aws-sdk-s3 (1.122.0)
3030
aws-sdk-core (~> 3, >= 3.165.0)
3131
aws-sdk-kms (~> 1)
3232
aws-sigv4 (~> 1.4)
@@ -130,7 +130,7 @@ GEM
130130
faraday-em_http (1.0.0)
131131
faraday-em_synchrony (1.0.0)
132132
faraday-excon (1.1.0)
133-
faraday-http-cache (2.4.1)
133+
faraday-http-cache (2.5.0)
134134
faraday (>= 0.8)
135135
faraday-httpclient (1.0.1)
136136
faraday-multipart (1.0.4)
@@ -189,7 +189,7 @@ GEM
189189
fastlane
190190
pry
191191
fastlane-plugin-sonarcloud_metric_kit (0.2.1)
192-
fastlane-plugin-stream_actions (0.2.4)
192+
fastlane-plugin-stream_actions (0.3.5)
193193
fastlane-plugin-versioning (0.5.1)
194194
ffi (1.15.5)
195195
fourflusher (2.3.1)
@@ -198,7 +198,7 @@ GEM
198198
git (1.18.0)
199199
addressable (~> 2.8)
200200
rchardet (~> 1.8)
201-
google-apis-androidpublisher_v3 (0.39.0)
201+
google-apis-androidpublisher_v3 (0.42.0)
202202
google-apis-core (>= 0.11.0, < 2.a)
203203
google-apis-core (0.11.0)
204204
addressable (~> 2.5, >= 2.5.1)
@@ -240,7 +240,7 @@ GEM
240240
http-cookie (1.0.5)
241241
domain_name (~> 0.5)
242242
httpclient (2.8.3)
243-
i18n (1.12.0)
243+
i18n (1.13.0)
244244
concurrent-ruby (~> 1.0)
245245
jazzy (0.14.3)
246246
cocoapods (~> 1.5)
@@ -264,7 +264,7 @@ GEM
264264
method_source (1.0.0)
265265
mini_magick (4.12.0)
266266
mini_mime (1.1.2)
267-
mini_portile2 (2.8.1)
267+
mini_portile2 (2.8.2)
268268
minitest (5.18.0)
269269
molinillo (0.8.0)
270270
multi_json (1.15.0)
@@ -277,8 +277,8 @@ GEM
277277
naturally (2.2.1)
278278
netrc (0.11.0)
279279
no_proxy_fix (0.1.2)
280-
nokogiri (1.14.3)
281-
mini_portile2 (~> 2.8.0)
280+
nokogiri (1.15.0)
281+
mini_portile2 (~> 2.8.2)
282282
racc (~> 1.4)
283283
octokit (5.6.1)
284284
faraday (>= 1, < 3)
@@ -287,15 +287,15 @@ GEM
287287
optparse (0.1.1)
288288
os (1.1.4)
289289
parallel (1.23.0)
290-
parser (3.2.2.0)
290+
parser (3.2.2.1)
291291
ast (~> 2.4.1)
292292
plist (3.7.0)
293293
pry (0.14.2)
294294
coderay (~> 1.1)
295295
method_source (~> 1.0)
296296
public_suffix (4.0.7)
297297
racc (1.6.2)
298-
rack (2.2.6.4)
298+
rack (2.2.7)
299299
rack-protection (3.0.6)
300300
rack
301301
rainbow (3.1.1)
@@ -320,7 +320,7 @@ GEM
320320
rubocop-ast (>= 1.23.0, < 2.0)
321321
ruby-progressbar (~> 1.7)
322322
unicode-display_width (>= 1.4.0, < 3.0)
323-
rubocop-ast (1.28.0)
323+
rubocop-ast (1.28.1)
324324
parser (>= 3.2.1.0)
325325
rubocop-performance (1.17.1)
326326
rubocop (>= 1.7.0, < 2.0)
@@ -356,7 +356,7 @@ GEM
356356
clamp (~> 1.3)
357357
nokogiri (>= 1.13.9)
358358
xcodeproj (~> 1.21)
359-
sqlite3 (1.6.2)
359+
sqlite3 (1.6.3)
360360
mini_portile2 (~> 2.8.0)
361361
terminal-notifier (2.0.0)
362362
terminal-table (1.8.0)
@@ -407,7 +407,7 @@ DEPENDENCIES
407407
fastlane-plugin-emerge
408408
fastlane-plugin-lizard
409409
fastlane-plugin-sonarcloud_metric_kit
410-
fastlane-plugin-stream_actions (= 0.2.4)
410+
fastlane-plugin-stream_actions (= 0.3.5)
411411
fastlane-plugin-versioning
412412
jazzy
413413
json

fastlane/Fastfile

Lines changed: 15 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import 'Allurefile'
99

1010
xcode_version = ENV['XCODE_VERSION'] || '14.2'
1111
xcode_project = 'StreamChatSwiftUI.xcodeproj'
12+
sdk_names = ['StreamChatSwiftUI']
1213
github_repo = ENV['GITHUB_REPOSITORY'] || 'GetStream/stream-chat-swiftui'
1314

1415
before_all do
@@ -25,50 +26,22 @@ end
2526

2627
desc 'Release a new version'
2728
lane :release do |options|
28-
ensure_git_branch(branch: 'main') # We can only release on default branch
29-
ensure_git_status_clean unless options[:no_ensure_clean]
30-
31-
UI.user_error!('Please set GITHUB_TOKEN environment value. See https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token') if ENV['GITHUB_TOKEN'].nil?
32-
33-
if options[:version].nil? # User passed a version, use it
34-
UI.user_error!('Please use type parameter with one of the options: type:patch, type:minor, type:major') unless ['patch', 'minor', 'major'].include?(options[:type])
35-
version_number = increment_version_number_in_plist(bump_type: options[:type], xcodeproj: xcode_project, target: 'StreamChatSwiftUI')
36-
else
37-
version_number = options.fetch(:version)
38-
increment_version_number_in_plist(version_number: version_number, xcodeproj: xcode_project, target: 'StreamChatSwiftUI')
39-
end
40-
41-
UI.user_error!("Tag for version #{version_number} already exists!") if git_tag_exists(tag: version_number)
42-
43-
changes = touch_changelog(release_version: version_number, github_repo: github_repo)
44-
45-
podspec = 'StreamChatSwiftUI.podspec'
46-
pod_lib_lint(podspec: podspec, allow_warnings: true)
47-
version_bump_podspec(path: podspec, version_number: version_number)
48-
49-
sh('git add -A')
50-
51-
UI.user_error!('Not committing changes') unless prompt(text: 'Will commit changes. All looking good?', boolean: true)
52-
53-
sh("git commit -m 'Bump #{version_number}'")
54-
sh("git tag #{version_number}")
55-
56-
UI.user_error!('Not pushing changes') unless prompt(text: 'Will push changes. All looking good?', boolean: true)
57-
58-
push_to_git_remote(tags: true)
59-
60-
github_release = set_github_release(
61-
repository_name: github_repo,
62-
api_token: ENV.fetch('GITHUB_TOKEN', nil),
63-
name: version_number,
64-
tag_name: version_number,
65-
description: changes
29+
version_number = release_ios_sdk(
30+
version: options[:version],
31+
bump_type: options[:type],
32+
sdk_names: sdk_names,
33+
github_repo: github_repo
6634
)
35+
publish_release(version: version_number)
36+
end
6737

68-
pod_push(path: podspec, allow_warnings: true)
69-
70-
UI.success("Successfully released #{version_number}")
71-
UI.success("Github release was created, please visit #{github_release['url']} to see it")
38+
desc "Publish a new release to GitHub and CocoaPods"
39+
lane :publish_release do |options|
40+
publish_ios_sdk(
41+
version: options[:version],
42+
sdk_names: sdk_names,
43+
github_repo: github_repo
44+
)
7245
end
7346

7447
private_lane :appstore_api_key do

fastlane/Pluginfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
gem 'fastlane-plugin-versioning'
66
gem 'fastlane-plugin-emerge'
77
gem 'fastlane-plugin-sonarcloud_metric_kit'
8-
gem 'fastlane-plugin-stream_actions', '0.2.4'
8+
gem 'fastlane-plugin-stream_actions', '0.3.5'

0 commit comments

Comments
 (0)