Skip to content

Commit 28f0152

Browse files
docs: add instructions for prereleases to the release guide (#4709)
1 parent 8e65800 commit 28f0152

File tree

1 file changed

+59
-1
lines changed

1 file changed

+59
-1
lines changed

etc/notes/releasing.md

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
# Releasing MongoDB Node.js Packages
22

3+
- [Releasing MongoDB Node.js Packages](#releasing-mongodb-nodejs-packages)
4+
- [Pre-requisites](#pre-requisites)
5+
- [Branching and backport strategy](#branching-and-backport-strategy)
6+
- [Backports](#backports)
7+
- [`release-please`](#release-please)
8+
- [Release Notes](#release-notes)
9+
- [Release Instructions](#release-instructions)
10+
- [Authentication](#authentication)
11+
- [Prebuilds](#prebuilds)
12+
- [Alphas / Prereleases](#alphas--prereleases)
13+
- [Packages](#packages)
14+
315
> [!NOTE]
4-
> _Last updated: Thu Jun 6_
16+
> _Last updated: Oct 1, 2025_
517
618
## Pre-requisites
719

@@ -95,6 +107,52 @@ prebuild uploads archives of the native dependency to the github release.
95107
Uploading binaries should happen automatically after the git tag/github release has been made.
96108
It may take some time for the building and uploading to finish, but no more than a few hours at most.
97109

110+
## Alphas / Prereleases
111+
112+
> [!NOTE]
113+
> This documentation uses `alpha` as the prerelease tag, but if you wish to use a different tag, just
114+
> replace `alpha` with the desired tag.
115+
116+
To configure a repo for a prerelease:
117+
118+
1. Update the release Github action's `npm publish` step to publish an alpha by specifying `--tag alpha`:
119+
120+
```yaml
121+
- run: npm publish --provenance --tag alpha
122+
if: ${{ needs.release_please.outputs.release_created }}
123+
env:
124+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
125+
```
126+
127+
2. Update the release please configuration file with the following parameters:
128+
1. Specify `prerelease-type: alpha`. This tells release-please that we want to use alpha as the pre-release tag.
129+
2. Specify `prerelease: true`. This tells release-please to create the Github release as a pre-release.
130+
3. Specify `versioning: prerelease`. This tells release-please that we wish to release a pre-release.
131+
132+
```json
133+
{
134+
"pull-request-header": "Please run the release_notes action before releasing to generate release highlights",
135+
"packages": {
136+
".": {
137+
"include-component-in-tag": false,
138+
"changelog-path": "HISTORY.md",
139+
"release-type": "node",
140+
"bump-minor-pre-major": false,
141+
"bump-patch-for-minor-pre-major": false,
142+
"draft": false,
143+
"prerelease-type": "alpha",
144+
"prerelease": true,
145+
"versioning": "prerelease"
146+
}
147+
}
148+
}
149+
```
150+
151+
After merging the a PR with the above changes, release-please should re-create the release PR as a PR to release
152+
an alpha.
153+
154+
Example PR: https://github.com/mongodb-js/mongodb-client-encryption/pull/104
155+
98156
## Packages
99157

100158
The following is a list of packages the Node.js team is responsible for and these release instructions apply to.

0 commit comments

Comments
 (0)