Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions .github/workflows/merge-main-to-develop.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/release-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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 }}

Comment on lines +42 to +45
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add retry/backoff to mitigate transient GitHub outages (root problem of IOS-1116).
Wrap merge_main with bounded retries and exponential backoff.

Apply:

-      - run: bundle exec fastlane merge_main
-        env:
-          GITHUB_TOKEN: ${{ secrets.ADMIN_API_TOKEN }}
+      - name: Merge main to develop (with retries)
+        env:
+          GITHUB_TOKEN: ${{ secrets.ADMIN_API_TOKEN }}
+        run: |
+          set -euo pipefail
+          for i in 1 2 3; do
+            echo "Attempt $i..."
+            if bundle exec fastlane merge_main; then
+              exit 0
+            fi
+            sleep $((i * 30))
+          done
+          echo "All attempts failed"
+          exit 1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- run: bundle exec fastlane merge_main
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_API_TOKEN }}
- name: Merge main to develop (with retries)
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_API_TOKEN }}
run: |
set -euo pipefail
for i in 1 2 3; do
echo "Attempt $i..."
if bundle exec fastlane merge_main; then
exit 0
fi
sleep $((i * 30))
done
echo "All attempts failed"
exit 1

- uses: 8398a7/action-slack@v3
if: failure()
with:
status: ${{ job.status }}
text: "⚠️ <!subteam^S030AAHLDLN>, 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 }}
2 changes: 0 additions & 2 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading