Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
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: 32 additions & 0 deletions .github/workflows/merge-release-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Merge Release Tag

on:
push:
tags:
- 'mongosh@[0-9]+.[0-9]+.[0-9]+*'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- 'mongosh@[0-9]+.[0-9]+.[0-9]+*'
- 'mongosh@[0-9]+.[0-9]+.[0-9]+'

I assume this is a regexp, in which case +* would be equivalent to just *

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, and, as Nikola suggested above, shouldn't it be

Suggested change
- 'mongosh@[0-9]+.[0-9]+.[0-9]+*'
- 'mongosh@[0-9]+\.[0-9]+\.[0-9]+'

then?

Copy link
Contributor Author

@gagik gagik Feb 21, 2025

Choose a reason for hiding this comment

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

It's GitHub regex-esque pattern: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
I think the idea is to allow -rc0.. though if it's just this we can also do

      - 'mongosh@[0-9]+.[0-9]+.[0-9]+'
      - 'mongosh@[0-9]+.[0-9]+.[0-9]-rc.[0-9]+'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure how escapes would work but GitHub Docs themselves don't use them and use i.e v[12].[0-9]+.[0-9]+

workflow_dispatch:

permissions:
contents: none # We use the github app to checkout and push changes

jobs:
merge-release-tag:
runs-on: ubuntu-latest

steps:
- uses: mongodb-js/devtools-shared/actions/setup-bot-token@main
id: app-token
with:
app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }}
private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}

- uses: actions/checkout@v4
with:
ref: main
fetch-depth: "0"
token: ${{ steps.app-token.outputs.token }}

- name: Merge release tag into main
run: |
git merge ${{ github.ref }} -m "chore(release): merge changes from ${{ github.ref_name }}"
Copy link
Contributor Author

@gagik gagik Feb 21, 2025

Choose a reason for hiding this comment

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

also added a message seems otherwise it may either prompt us to do it or use the default which maybe isn't best? ideally it'd fast-forward but I think because of the changelog bumps etc this may not always be the case.

git push origin main
2 changes: 1 addition & 1 deletion packages/build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Execute the following steps to publish a new release:
```
Follow the instructions and verify the inferred release version is correct.
7. Wait for Evergreen to finish the publication stage.
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.
8. Ensure that the version bump was automatically merged into main and that it is synced up with the `[email protected]` tag.
9. Close the Jira ticket for the release, post an update in the `#mongosh` Slack channel and ping the docs team.

### Branches and Tags
Expand Down
Loading