Skip to content

Commit 6cc8509

Browse files
committed
fix fastlane
1 parent aa5dfb5 commit 6cc8509

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

fastlane/Fastfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ platform :ios do
88
lane :release_sdk do
99
set_version = prompt(text: "Please set the release version number")
1010
set_output_dir = prompt(text: "Please specify an output directory")
11+
set_github_token = prompt(text: "Please provide github token")
1112

1213
bump_release_version(version:set_version)
1314
clean_and_lint
1415
build_xcframework(output_dir:set_output_dir)
15-
tag_version(version:set_version)
16+
create_release(version:set_version, output_dir:set_output_dir, github_token:set_github_token)
1617
pod_trunk_push
1718
end
1819

@@ -76,12 +77,14 @@ platform :ios do
7677
end
7778

7879
desc "create github release and upload assets"
79-
lane :tag_version do |options|
80+
lane :create_release do |options|
8081
version = options[:version]
8182
output_dir = options[:output_dir]
83+
84+
github_token = options[:github_token]
85+
set_api_token = github_token.empty? ? ENV["GITHUB_TOKEN"] : github_token
8286

83-
add_git_tag(tag: "#{version}")
84-
push_git_tags
87+
add_git_tag(tag: "#{version}")
8588

8689
version_changelog = read_changelog(
8790
changelog_path: 'CHANGELOG.md',
@@ -90,8 +93,8 @@ platform :ios do
9093

9194
github_release = set_github_release(
9295
repository_name: "Iterable/swift-sdk",
93-
api_token: ENV["GITHUB_TOKEN"],
94-
name: "github release version #{version}",
96+
api_token: set_api_token,
97+
name: "#{version}",
9598
tag_name: "#{version}",
9699
description: version_changelog,
97100
commitish: "master",

0 commit comments

Comments
 (0)