|
1 | 1 | # Releasing MongoDB Node.js Packages
|
2 | 2 |
|
| 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 | + |
3 | 15 | > [!NOTE]
|
4 | | -> _Last updated: Thu Jun 6_ |
| 16 | +> _Last updated: Oct 1, 2025_ |
5 | 17 |
|
6 | 18 | ## Pre-requisites
|
7 | 19 |
|
@@ -95,6 +107,52 @@ prebuild uploads archives of the native dependency to the github release.
|
95 | 107 | Uploading binaries should happen automatically after the git tag/github release has been made.
|
96 | 108 | It may take some time for the building and uploading to finish, but no more than a few hours at most.
|
97 | 109 |
|
| 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 | + |
98 | 156 | ## Packages
|
99 | 157 |
|
100 | 158 | The following is a list of packages the Node.js team is responsible for and these release instructions apply to.
|
|
0 commit comments