Skip to content

Commit 579ac6e

Browse files
[CI] Automate the release step of merging the main branch to develop (#842)
1 parent c06747d commit 579ac6e

File tree

5 files changed

+42
-16
lines changed

5 files changed

+42
-16
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Merge main to develop"
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
merge:
11+
name: Merge
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4.1.1
15+
with:
16+
token: ${{ secrets.ADMIN_API_TOKEN }}
17+
fetch-depth: 0
18+
19+
- uses: ./.github/actions/ruby-cache
20+
21+
- run: bundle exec fastlane merge_main
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.ADMIN_API_TOKEN }}
24+
25+
- uses: 8398a7/action-slack@v3
26+
if: failure()
27+
with:
28+
status: ${{ job.status }}
29+
text: "⚠️ <!subteam^S05RBQ69U1H>, the merge of `main` to `develop` failed on CI. Consider using this command locally: `bundle exec fastlane merge_main`"
30+
fields: repo,commit,author,workflow
31+
env:
32+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

.github/workflows/release-publish.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,3 @@ jobs:
2626
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
2727
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
2828
run: bundle exec fastlane publish_release --verbose
29-
30-
- uses: 8398a7/action-slack@v3
31-
with:
32-
status: ${{ job.status }}
33-
text: "🎉 The new release has been shipped! 🚢\n\n⚠️ <!subteam^S05RBQ69U1H>, don't forget to merge `main` back to `develop` from `localhost` using the command: `bundle exec fastlane merge_main`"
34-
fields: repo
35-
env:
36-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

Gemfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ GEM
2626
ast (2.4.3)
2727
atomos (0.1.3)
2828
aws-eventstream (1.4.0)
29-
aws-partitions (1.1112.0)
29+
aws-partitions (1.1114.0)
3030
aws-sdk-core (3.225.1)
3131
aws-eventstream (~> 1, >= 1.3.0)
3232
aws-partitions (~> 1, >= 1.992.0)
3333
aws-sigv4 (~> 1.9)
3434
base64
3535
jmespath (~> 1, >= 1.6.1)
3636
logger
37-
aws-sdk-kms (1.103.0)
37+
aws-sdk-kms (1.104.0)
3838
aws-sdk-core (~> 3, >= 3.225.0)
3939
aws-sigv4 (~> 1.5)
4040
aws-sdk-s3 (1.189.0)
@@ -163,7 +163,7 @@ GEM
163163
faraday_middleware (1.2.1)
164164
faraday (~> 1.0)
165165
fastimage (2.4.0)
166-
fastlane (2.227.2)
166+
fastlane (2.228.0)
167167
CFPropertyList (>= 2.3, < 4.0.0)
168168
addressable (>= 2.8, < 3.0.0)
169169
artifactory (~> 3.0)
@@ -210,7 +210,7 @@ GEM
210210
bundler
211211
fastlane
212212
pry
213-
fastlane-plugin-stream_actions (0.3.83)
213+
fastlane-plugin-stream_actions (0.3.84)
214214
xctest_list (= 1.2.1)
215215
fastlane-plugin-versioning (0.7.1)
216216
fastlane-sirp (1.0.0)
@@ -287,7 +287,7 @@ GEM
287287
mutex_m (0.3.0)
288288
nanaimo (0.4.0)
289289
nap (1.1.0)
290-
naturally (2.2.1)
290+
naturally (2.2.2)
291291
netrc (0.11.0)
292292
nio4r (2.7.4)
293293
nkf (0.2.0)
@@ -345,7 +345,7 @@ GEM
345345
rubocop-ast (>= 1.23.0, < 2.0)
346346
ruby-progressbar (~> 1.7)
347347
unicode-display_width (>= 1.4.0, < 3.0)
348-
rubocop-ast (1.45.0)
348+
rubocop-ast (1.45.1)
349349
parser (>= 3.3.7.2)
350350
prism (~> 1.4)
351351
rubocop-performance (1.19.1)
@@ -424,7 +424,7 @@ DEPENDENCIES
424424
fastlane
425425
fastlane-plugin-create_xcframework
426426
fastlane-plugin-lizard
427-
fastlane-plugin-stream_actions (= 0.3.83)
427+
fastlane-plugin-stream_actions (= 0.3.84)
428428
fastlane-plugin-versioning
429429
json
430430
plist

fastlane/Fastfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ lane :publish_release do |options|
105105
)
106106

107107
update_spm(version: release_version)
108+
109+
sh('gh workflow run merge-main-to-develop.yml --ref main')
108110
end
109111

110112
lane :get_sdk_version_from_environment do

fastlane/Pluginfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
gem 'fastlane-plugin-versioning'
22
gem 'fastlane-plugin-create_xcframework'
3-
gem 'fastlane-plugin-stream_actions', '0.3.83'
3+
gem 'fastlane-plugin-stream_actions', '0.3.84'

0 commit comments

Comments
 (0)