Skip to content

Commit 61ab702

Browse files
committed
refactor git tag step
1 parent 6f95d2e commit 61ab702

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/ios-sdk-release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ jobs:
4848
- name: create xcframeworks and zip
4949
run: bundle exec fastlane ios build_xcframework output_dir:./output_dir
5050

51+
- name: create and push git tag
52+
run: bundle exec fastlane ios create_git_tag version:$VERSION
53+
5154
- name: create github release and upload assets
5255
run: |
5356
bundle exec fastlane ios create_release version:$VERSION branch:$BRANCH changelog_section:$CHANGELOG_SECTION output_dir:$OUTPUT_DIR github_token:$GITHUB_TOKEN set_prerelease:$SET_PRERELEASE

fastlane/Fastfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ platform :ios do
1414
bump_release_version(version:set_version)
1515
clean_and_lint
1616
build_xcframework(output_dir:set_output_dir)
17+
create_git_tag(version:set_version)
1718
create_release(version:set_version, output_dir:set_output_dir, changelog_section:set_changelog_section, github_token:set_github_token)
1819
pod_trunk_push
1920
end
@@ -77,6 +78,14 @@ platform :ios do
7778
)
7879
end
7980

81+
desc "create git tag and push tag"
82+
lane :create_git_tag do |options|
83+
version = options[:version]
84+
85+
add_git_tag(tag: "#{version}")
86+
push_git_tags
87+
end
88+
8089
desc "create github release and upload assets"
8190
lane :create_release do |options|
8291
version = options[:version]
@@ -86,8 +95,6 @@ platform :ios do
8695
github_token = options[:github_token]
8796
set_prerelease = options[:set_prerelease]
8897

89-
add_git_tag(tag: "#{version}")
90-
9198
version_changelog = read_changelog(
9299
changelog_path: 'CHANGELOG.md',
93100
section_identifier: "[#{changelog_section}]",

0 commit comments

Comments
 (0)