fastlane-plugin-stream_actions 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/stream_actions/actions/next_pr_number.rb +49 -0
- data/lib/fastlane/plugin/stream_actions/actions/publish_ios_sdk.rb +32 -20
- data/lib/fastlane/plugin/stream_actions/actions/select_xcode.rb +0 -1
- data/lib/fastlane/plugin/stream_actions/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca06e9e0820bf90f20192d8bf762e3743b5ef18613cab71ca4126e7c3c6beeb6
|
|
4
|
+
data.tar.gz: 6184465095169e256dc90c3ac979fbed6783a597c4db02eaba861ec19a3a8cd9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3735e7cad6c2ef6a602685cfba12dc7f16b226ed81fa8ebe8edbc10de377ecb04670ca1cf798787b26729750223f99efd82827cc44205e518c6134183fa34a34
|
|
7
|
+
data.tar.gz: b7d87ad3aa7d5c0d8a5f0dde85d41fae46ebce067b40e5bb99c6eddae9bc09b9ab8a5e4f648947fbed88788246338acdbe09cf3d623a52d49a165a7f712b9b57
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
module Fastlane
|
|
2
|
+
module Actions
|
|
3
|
+
class NextPrNumberAction < Action
|
|
4
|
+
def self.run(params)
|
|
5
|
+
uri = URI('https://api.github.com/repos')
|
|
6
|
+
uri.path += "/#{params[:github_repo]}/issues"
|
|
7
|
+
uri.query = URI.encode_www_form('state' => 'all', 'sort' => 'created', 'direction' => 'desc', 'per_page' => 1)
|
|
8
|
+
|
|
9
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
|
10
|
+
http.use_ssl = true
|
|
11
|
+
request = Net::HTTP::Get.new(uri.request_uri)
|
|
12
|
+
token = ENV.fetch('GITHUB_TOKEN') { nil }
|
|
13
|
+
token = ENV.fetch('GH_TOKEN') { nil } if token.to_s.empty?
|
|
14
|
+
request['Authorization'] = "Bearer #{token}" unless token.to_s.empty?
|
|
15
|
+
|
|
16
|
+
response = http.request(request)
|
|
17
|
+
UI.user_error!("GitHub API request failed: #{response.code} #{response.message} — body: #{response.body}") if response.code != '200'
|
|
18
|
+
|
|
19
|
+
list = JSON.parse(response.body)
|
|
20
|
+
max_num = list.empty? ? 0 : list[0]['number'].to_i
|
|
21
|
+
next_num = max_num + 1
|
|
22
|
+
UI.important("Next pull request number: #{next_num}")
|
|
23
|
+
next_num
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
#####################################################
|
|
27
|
+
# @!group Documentation
|
|
28
|
+
#####################################################
|
|
29
|
+
|
|
30
|
+
def self.description
|
|
31
|
+
'Get next pull request number'
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def self.available_options
|
|
35
|
+
[
|
|
36
|
+
FastlaneCore::ConfigItem.new(
|
|
37
|
+
key: :github_repo,
|
|
38
|
+
env_name: 'GITHUB_REPOSITORY',
|
|
39
|
+
description: 'GitHub repo name'
|
|
40
|
+
)
|
|
41
|
+
]
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def self.is_supported?(platform)
|
|
45
|
+
[:ios].include?(platform)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -2,35 +2,40 @@ module Fastlane
|
|
|
2
2
|
module Actions
|
|
3
3
|
class PublishIosSdkAction < Action
|
|
4
4
|
def self.run(params)
|
|
5
|
+
skip_spm = params[:skip_spm].to_s.casecmp('true').zero?
|
|
6
|
+
skip_pods = params[:skip_pods].to_s.casecmp('true').zero?
|
|
5
7
|
version_number = params[:version]
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
unless skip_spm
|
|
10
|
+
ensure_everything_is_set_up(params)
|
|
11
|
+
ensure_release_tag_is_new(version_number)
|
|
9
12
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
changes =
|
|
14
|
+
if params[:use_changelog]
|
|
15
|
+
params[:changelog] || other_action.read_changelog(version: version_number, changelog_path: params[:changelog_path])
|
|
16
|
+
else
|
|
17
|
+
version_number
|
|
18
|
+
end
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
other_action.set_github_release(
|
|
21
|
+
repository_name: params[:github_repo],
|
|
22
|
+
api_token: params[:github_token],
|
|
23
|
+
name: version_number,
|
|
24
|
+
tag_name: version_number,
|
|
25
|
+
description: changes,
|
|
26
|
+
commitish: other_action.current_branch,
|
|
27
|
+
upload_assets: params[:upload_assets],
|
|
28
|
+
is_prerelease: version_number.downcase.include?('beta')
|
|
29
|
+
)
|
|
30
|
+
end
|
|
27
31
|
|
|
28
|
-
unless
|
|
32
|
+
unless skip_pods
|
|
29
33
|
podspecs = params[:podspec_names]&.map { |sdk| "#{sdk}.podspec" } || []
|
|
30
34
|
podspecs.each { |podspec| other_action.pod_push_safely(podspec: podspec) }
|
|
31
35
|
end
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
destination = skip_spm ? 'CocoaPods' : skip_pods ? 'SPM' : 'Error'
|
|
38
|
+
UI.success("Github release v#{version_number} has been published to #{destination} 🚢")
|
|
34
39
|
end
|
|
35
40
|
|
|
36
41
|
def self.ensure_everything_is_set_up(params)
|
|
@@ -66,6 +71,13 @@ module Fastlane
|
|
|
66
71
|
is_string: false,
|
|
67
72
|
optional: true
|
|
68
73
|
),
|
|
74
|
+
FastlaneCore::ConfigItem.new(
|
|
75
|
+
key: :skip_spm,
|
|
76
|
+
description: 'Skip release to GitHub and SPM?',
|
|
77
|
+
is_string: false,
|
|
78
|
+
optional: true,
|
|
79
|
+
default_value: false
|
|
80
|
+
),
|
|
69
81
|
FastlaneCore::ConfigItem.new(
|
|
70
82
|
key: :skip_pods,
|
|
71
83
|
description: 'Skip release to CocoaPods?',
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-stream_actions
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GetStream
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: xctest_list
|
|
@@ -242,6 +242,7 @@ files:
|
|
|
242
242
|
- lib/fastlane/plugin/stream_actions/actions/is_check_required.rb
|
|
243
243
|
- lib/fastlane/plugin/stream_actions/actions/merge_main_to_develop.rb
|
|
244
244
|
- lib/fastlane/plugin/stream_actions/actions/merge_release_to_main.rb
|
|
245
|
+
- lib/fastlane/plugin/stream_actions/actions/next_pr_number.rb
|
|
245
246
|
- lib/fastlane/plugin/stream_actions/actions/pod_push_safely.rb
|
|
246
247
|
- lib/fastlane/plugin/stream_actions/actions/pr_comment.rb
|
|
247
248
|
- lib/fastlane/plugin/stream_actions/actions/pr_create.rb
|
|
@@ -281,7 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
281
282
|
- !ruby/object:Gem::Version
|
|
282
283
|
version: '0'
|
|
283
284
|
requirements: []
|
|
284
|
-
rubygems_version: 3.
|
|
285
|
+
rubygems_version: 3.4.1
|
|
285
286
|
signing_key:
|
|
286
287
|
specification_version: 4
|
|
287
288
|
summary: stream custom actions
|