Project owners publish new releases of @mdn/browser-compat-data
on npm.
MDN staff deploy the package to the MDN site.
Usually, this happens every Thursday (MDN never deploys to production on Fridays).
Any project owner (or release designee) can complete the following steps to publish a new version, but please coordinate releases with @ddbeck.
The steps in this process assume:
NPM_TOKEN
is set in the repository secrets. If the token is invalidated or unset, a member of the@mdn
organization on npm must create a new token and add it to the repository's secrets.
Anticipate a release by keeping a running draft pull request to prepare documentation and metadata for the release. See #9466 as an example.
Start preparing a release when:
- the first pull request labeled needs-release-note 📰 has been merged after the most-recent release
- you're ready to issue a new release
whichever comes first.
-
Start a new branch for the upcoming release. For example, run
git switch -c release-YYYY-MM-DD
, whereYYYY-MM-DD
is the target release date. -
Increment the package version with
npm version --no-git-tag-version
and commit the change.For example, to increment the version for a routine data update with no breaking changes or new features, run
npm version --no-git-tag-version patch
, then commit the changes to the package metadata files.If needed, you can repeat this step on the same branch, using a
minor
ormajor
argument (instead ofpatch
), to increment the version for newly-introduced features or breaking changes (see Semantic versioning policy). -
Add a section for the upcoming release to
RELEASE_NOTES.md
. Use the previous release as a template. Omit or leave a placeholder for the statistics. -
Push the release branch to your remote, then open a draft pull request.
-
Until you're ready to issue a release, add more release notes to the draft pull request, when such changes are merged.
When a release is imminent:
-
Confirm that all pull requests labeled needs-release-note 📰 have been entered into the release notes. Run
npm run release-pulls
to get a link to all of the labeled pull requests since the previous release toHEAD
. -
Add the release statistics to the release notes. Switch to the
main
branch, then runnpm run release-stats
. After completing the prompts, copy the output, switch back to the release branch, and add the statistics toRELEASE_NOTES.md
. -
Push any outstanding changes to the release branch.
-
Mark the pull request as ready for review. If applicable or desired, seek a review, then merge the pull request.
The package is now ready to be published.
-
Start a draft release on GitHub.
- In the Tag version and Release title fields, enter
vX.Y.Z
whereX.Y.Z
in the version number inpackage.json
. - In the Describe this release field, paste the release note text from
RELEASE_NOTES.md
.
Note: If you're not ready to publish to npm, click Save draft in GitHub and resume this process later.
- In the Tag version and Release title fields, enter
-
Click Publish release to create the tag and trigger the workflow that publishes to npm. Wait for the release GitHub Actions workflow to finish successfully.
-
Check
@mdn/browser-compat-data
on npm to see if the release shows up correctly.
The package is now published and you have finished releasing BCD! 🎉