From f74b706664c760225ae56d4d0b271cb5827191ef Mon Sep 17 00:00:00 2001 From: Alexey Alter-Pesotskiy Date: Tue, 9 Sep 2025 15:46:26 +0100 Subject: [PATCH] [CI] Merge main to develop after release on the same workflow run --- .github/workflows/merge-main-to-develop.yml | 32 --------------------- .github/workflows/release-merge.yml | 2 +- .github/workflows/release-publish.yml | 25 ++++++++++++++++ fastlane/Fastfile | 2 -- 4 files changed, 26 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/merge-main-to-develop.yml diff --git a/.github/workflows/merge-main-to-develop.yml b/.github/workflows/merge-main-to-develop.yml deleted file mode 100644 index 43b7da2c50b..00000000000 --- a/.github/workflows/merge-main-to-develop.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: "Merge main to develop" - -on: - workflow_dispatch: - -permissions: - contents: write - -jobs: - merge: - name: Merge - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4.1.1 - with: - token: ${{ secrets.ADMIN_API_TOKEN }} - fetch-depth: 0 - - - uses: ./.github/actions/ruby-cache - - - run: bundle exec fastlane merge_main - env: - GITHUB_TOKEN: ${{ secrets.ADMIN_API_TOKEN }} - - - uses: 8398a7/action-slack@v3 - if: failure() - with: - status: ${{ job.status }} - text: "⚠️ , the merge of `main` to `develop` failed on CI. Consider using this command locally: `bundle exec fastlane merge_main`" - fields: repo,commit,author,workflow - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/release-merge.yml b/.github/workflows/release-merge.yml index 250cab82c13..01763637e78 100644 --- a/.github/workflows/release-merge.yml +++ b/.github/workflows/release-merge.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: jobs: - merge-comment: + merge-release-to-main: name: Merge release to main runs-on: macos-15 if: github.event_name == 'workflow_dispatch' || (github.event.issue.pull_request && github.event.issue.state == 'open' && github.event.comment.body == '/merge release') diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 4b8db0bf5e0..8c9ed4607e5 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -26,3 +26,28 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }} run: bundle exec fastlane publish_release --verbose + + merge-main-to-develop: + name: Merge main to develop + runs-on: ubuntu-latest + needs: release + steps: + - uses: actions/checkout@v4.1.1 + with: + token: ${{ secrets.ADMIN_API_TOKEN }} + fetch-depth: 0 + + - uses: ./.github/actions/ruby-cache + + - run: bundle exec fastlane merge_main + env: + GITHUB_TOKEN: ${{ secrets.ADMIN_API_TOKEN }} + + - uses: 8398a7/action-slack@v3 + if: failure() + with: + status: ${{ job.status }} + text: "⚠️ , the merge of `main` to `develop` failed on CI. Consider using this command locally: `bundle exec fastlane merge_main`" + fields: repo,commit,author,workflow + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 5fc410da4cb..bc05da17068 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -134,8 +134,6 @@ lane :publish_release do |options| ) update_spm(version: release_version) - - sh('gh workflow run merge-main-to-develop.yml --ref main') end lane :get_sdk_version_from_environment do