-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Automate the merge of the release branches (#570)
- Loading branch information
1 parent
acfa498
commit 03081df
Showing
4 changed files
with
67 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: "Merge release" | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
merge-comment: | ||
name: Merge release to main | ||
runs-on: macos-14 | ||
if: github.event_name == 'workflow_dispatch' || (github.event.issue.pull_request && github.event.issue.state == 'open' && github.event.comment.body == '/merge release') | ||
steps: | ||
- name: Connect iOS Bot | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }} | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: ./.github/actions/ruby-cache | ||
|
||
- name: Merge | ||
run: bundle exec fastlane merge_release_to_main author:"$USER_LOGIN" --verbose | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ADMIN_API_TOKEN }} # A token with the "admin:org" scope to get the list of the team members on GitHub | ||
GITHUB_PR_NUM: ${{ github.event.issue.number }} | ||
USER_LOGIN: ${{ github.event.comment.user.login != null && github.event.comment.user.login || github.event.sender.login }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,16 +17,20 @@ jobs: | |
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }} | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Extract version from branch name (for release branches) | ||
if: startsWith(github.event.pull_request.head.ref, 'release/') | ||
run: | | ||
BRANCH_NAME="${{ github.event.pull_request.head.ref }}" | ||
VERSION=${BRANCH_NAME#release/} | ||
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV | ||
- uses: ./.github/actions/ruby-cache | ||
|
||
- name: "Fastlane - Publish Release" | ||
if: startsWith(github.event.pull_request.head.ref, 'release/') | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,11 +17,15 @@ jobs: | |
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }} | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 # to fetch git tags | ||
|
||
- uses: ./.github/actions/ruby-cache | ||
|
||
- uses: ./.github/actions/xcode-cache | ||
|
||
- name: Create Release PR | ||
run: bundle exec fastlane release version:"${{ github.event.inputs.version }}" --verbose | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters