Skip to content

Commit 2991295

Browse files
committed
refactor
1 parent d977c22 commit 2991295

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

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

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,27 @@ on:
77
version_number:
88
description: "iOS SDK version"
99
required: true
10+
branch:
11+
description: "Branch to release (defaults to master)"
12+
required: true
13+
default: "master"
1014
changelog_section:
1115
description: "Changelog version header (e.g. 6.4.17, 6.5.0-beta)"
1216
required: true
1317
set_prerelease:
1418
type: boolean
1519
description: "Is this a prerelease?"
1620
default: false
21+
env:
22+
VERSION: ${{ github.event.inputs.version_number }}
23+
BRANCH: ${{ github.event.inputs.branch }}
24+
CHANGELOG_SECTION: ${{ github.event.inputs.changelog_section }}
25+
OUTPUT_DIR: ./output_dir
26+
GITHUB_TOKEN: ${{ secrets.SDK_RELEASE_TOKEN }}
27+
RELEASE_BRANCH:
28+
SET_PRERELEASE: ${{ github.event.inputs.set_prerelease }}
29+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
30+
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
1731

1832
jobs:
1933
ios-sdk-release:
@@ -29,7 +43,7 @@ jobs:
2943
run: gem install cocoapods
3044

3145
- name: set version number and push podspecs to git
32-
run: bundle exec fastlane ios bump_release_version version:${{ github.event.inputs.version_number }}
46+
run: bundle exec fastlane ios bump_release_version version:$VERSION
3347

3448
- name: clean cocaopods cache and lint
3549
run: bundle exec fastlane ios clean_and_lint
@@ -38,13 +52,12 @@ jobs:
3852
run: bundle exec fastlane ios build_xcframework output_dir:./output_dir
3953

4054
- name: create github release and upload assets
55+
4156
run: |
42-
bundle exec fastlane ios create_release version:${{ github.event.inputs.version_number }} changelog_section:${{ github.event.inputs.changelog_section }} output_dir:./output_dir github_token:${{ secrets.SDK_RELEASE_TOKEN }} set_prerelease: ${{ github.event.inputs.set_prerelease }}
57+
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
4358
4459
- name: push pods to trunk
4560
run: bundle exec fastlane ios pod_trunk_push
46-
env:
47-
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
4861

4962
- name: slack notification
50-
run: bundle exec fastlane ios slack version:${{ github.event.inputs.version_number }} changelog_section:${{ github.event.inputs.changelog_section }} slack_webhook:${{ secrets.SLACK_WEBHOOK }}
63+
run: bundle exec fastlane ios slack version:$VERSION changelog_section:$CHANGELOG_SECTION slack_webhook:$SLACK_WEBHOOK

0 commit comments

Comments
 (0)