Repo admins publish new releases of mdn-data on npm. This is then used by MDN to generate various sidebars as well as other things.
Any admin can complete the following steps to publish a new version, but please coordinate releases with @ddbeck or @Rumyra.
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.
Prepare for a release by creating a pull request to update metadata for the release. See #507 as an example.
-
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. -
Push the release branch to your remote, open a pull request, and then review/merge it.
-
Start a draft release on GitHub.
- In the Tag version and Release title fields, enter
vX.Y.Z
whereX.Y.Z
is the version number you'd like to publish. Do not use an existing value, but instead select an increment from the previous release. For example, if the previous release wasv2.0.20
, usev2.0.21
for the Tag version and Release title fields. - You can leave the Describe this release field blank, or add notes as you wish.
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
npm publish
GitHub Actions workflow to finish successfully. -
Check
mdn-data
on npm to see if the release shows up correctly.
The package is now published. 🎉