Skip to content

Commit 1190d9a

Browse files
authored
chore(ci): add automatic merging of the release tag MONGOSH-2018 (#2379)
The new system requires us to manually merge into main. This automates that with a new workflow.
1 parent d19a7ed commit 1190d9a

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Merge Release Tag
2+
3+
on:
4+
push:
5+
tags:
6+
- 'mongosh@[0-9]+.[0-9]+.[0-9]+'
7+
- 'mongosh@[0-9]+.[0-9]+.[0-9]-rc.[0-9]+'
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: none # We use the github app to checkout and push changes
12+
13+
jobs:
14+
merge-release-tag:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: mongodb-js/devtools-shared/actions/setup-bot-token@main
19+
id: app-token
20+
with:
21+
app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }}
22+
private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}
23+
24+
- uses: actions/checkout@v4
25+
with:
26+
ref: main
27+
fetch-depth: "0"
28+
token: ${{ steps.app-token.outputs.token }}
29+
30+
- name: Merge release tag into main
31+
run: |
32+
git merge ${{ github.ref }} -m "chore(release): merge changes from ${{ github.ref_name }}"
33+
git push origin main

packages/build/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Execute the following steps to publish a new release:
3939
```
4040
Follow the instructions and verify the inferred release version is correct.
4141
7. Wait for Evergreen to finish the publication stage.
42-
8. The previous step will have pushed tags for the npm publishes. Check out the tag for `mongosh@<version>` (not `v<version>`), create a branch for it, push that branch and open a PR with it. Then immediately merge that branch **using the `git merge` CLI command into main** and push to main. **NEVER** use the Github PR merge functionality, since that would squash the commit and give it a new commit hash that is different from the one in the tag.
42+
8. Ensure that the version bump was automatically merged into main and that it is synced up with the `[email protected]` tag.
4343
9. Close the Jira ticket for the release, post an update in the `#mongosh` Slack channel and ping the docs team.
4444

4545
### Branches and Tags

0 commit comments

Comments
 (0)