Skip to content

Commit 27ca8b0

Browse files
committed
[CI] Merge main to develop after release on the same workflow run
1 parent 95391cb commit 27ca8b0

File tree

4 files changed

+26
-35
lines changed

4 files changed

+26
-35
lines changed

.github/workflows/merge-main-to-develop.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/release-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88

99
jobs:
10-
merge-comment:
10+
merge-release-to-main:
1111
name: Merge release to main
1212
runs-on: macos-15
1313
if: github.event_name == 'workflow_dispatch' || (github.event.issue.pull_request && github.event.issue.state == 'open' && github.event.comment.body == '/merge release')

.github/workflows/release-publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,28 @@ jobs:
2323
env:
2424
GITHUB_TOKEN: ${{ secrets.CI_BOT_GITHUB_TOKEN }}
2525
run: bundle exec fastlane publish_release --verbose
26+
27+
merge-main-to-develop:
28+
name: Merge main to develop
29+
runs-on: ubuntu-latest
30+
needs: release
31+
steps:
32+
- uses: actions/checkout@v4.1.1
33+
with:
34+
token: ${{ secrets.ADMIN_API_TOKEN }}
35+
fetch-depth: 0
36+
37+
- uses: ./.github/actions/ruby-cache
38+
39+
- run: bundle exec fastlane merge_main
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.ADMIN_API_TOKEN }}
42+
43+
- uses: 8398a7/action-slack@v3
44+
if: failure()
45+
with:
46+
status: ${{ job.status }}
47+
text: "⚠️ <!subteam^S030AAHLDLN>, the merge of `main` to `develop` failed on CI. Consider using this command locally: `bundle exec fastlane merge_main`"
48+
fields: repo,commit,author,workflow
49+
env:
50+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

fastlane/Fastfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ lane :publish_release do |options|
7171
version: release_version,
7272
github_repo: github_repo
7373
)
74-
75-
sh('gh workflow run merge-main-to-develop.yml --ref main')
7674
end
7775

7876
lane :get_sdk_version_from_environment do

0 commit comments

Comments
 (0)