Skip to content

Commit

Permalink
Merge pull request #723 from Iterable/MOB-7595-ios-sdk-automation-ref…
Browse files Browse the repository at this point in the history
…actor

[MOB-7595] iOS SDK Release automation refactor
  • Loading branch information
jyu115 committed Jan 30, 2024
2 parents ee39be7 + 61ab702 commit c769c34
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ios-sdk-release.yml
Expand Up @@ -42,17 +42,16 @@ jobs:
- name: Install Cocoapods
run: gem install cocoapods

- name: set version number and push podspecs to git
run: bundle exec fastlane ios bump_release_version version:$VERSION

- name: clean cocaopods cache and lint
run: bundle exec fastlane ios clean_and_lint

- name: create xcframeworks and zip
run: bundle exec fastlane ios build_xcframework output_dir:./output_dir

- name: create github release and upload assets
- name: create and push git tag
run: bundle exec fastlane ios create_git_tag version:$VERSION

- name: create github release and upload assets
run: |
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
Expand Down
11 changes: 9 additions & 2 deletions fastlane/Fastfile
Expand Up @@ -14,6 +14,7 @@ platform :ios do
bump_release_version(version:set_version)
clean_and_lint
build_xcframework(output_dir:set_output_dir)
create_git_tag(version:set_version)
create_release(version:set_version, output_dir:set_output_dir, changelog_section:set_changelog_section, github_token:set_github_token)
pod_trunk_push
end
Expand Down Expand Up @@ -77,6 +78,14 @@ platform :ios do
)
end

desc "create git tag and push tag"
lane :create_git_tag do |options|
version = options[:version]

add_git_tag(tag: "#{version}")
push_git_tags
end

desc "create github release and upload assets"
lane :create_release do |options|
version = options[:version]
Expand All @@ -86,8 +95,6 @@ platform :ios do
github_token = options[:github_token]
set_prerelease = options[:set_prerelease]

add_git_tag(tag: "#{version}")

version_changelog = read_changelog(
changelog_path: 'CHANGELOG.md',
section_identifier: "[#{changelog_section}]",
Expand Down

0 comments on commit c769c34

Please sign in to comment.