Note
This information is for project owners.
These are the steps to publish a regular release on npm and as a GitHub release:
-
Determine if it should be a major, minor, or patch release.
A major version is required for releases when:
- Previously valid references are invalid (for example, a group ID is renamed or a feature ID is removed).
- Types have incompatibly narrowed, widened, or otherwise changed (for example, a string value now accepts an array of strings or an ID has become a URL). Changes to
data.schema.json
often indicates a major or minor version is required.
A minor version is required for releases that contain only additions, such as new feature or new properties on existing types.
Patch versions are required for releases that contain only routine data changes, such as updates to
compat_features
arrays orsupport
objects.The "major version required" and "minor version required" labels should be used to support this decision.
-
Trigger the Prepare web-features release workflow.
- Click the Run workflow dropdown.
- Choose the semver level.
- Click the Run workflow button.
When the workflow finishes, your review is requested on a new release pull request.
-
Review the PR.
- Close and reopen the release PR, to allow the tests to run.
- Review and approve the changes.
- When you're ready to complete the remaining steps, merge the PR.
-
Create the GitHub release.
-
Go to https://github.com/web-platform-dx/web-features/releases/new to start a new draft release.
-
Fill in the tag name
vX.Y.Z
manually as both the tag and release title. -
For minor releases, add a
## What's New
section to the top of the release notes, before all other sections. -
For major releases, add a
## Breaking Changes
section to the top of the release notes, before all other sections. -
Click Generate release notes.
-
In the release description, find unescaped
<
characters and make sure that HTML elements are enclosed with backticks.This regular expression can help:
/ (?<!`)<(.*?)> /
-
Remove all lines from Dependabot.
-
Click Publish release.
Publishing the GitHub release creates the tag. This triggers the Publish web-features GitHub Actions workflows, uploads GitHub release artifacts and publishes the package to npm.
-
-
Remove the "major version required" and "minor version required" labels from any pull requests that were included in the release.
-
(Optional) If this release contained schema changes, notify highly-visible downstream consumers, such as Can I Use (@Fyrd), MDN (@LeoMcA), or webstatus.dev (@jcscottiii).
The Publish web-features@next GitHub Actions workflows automatically publish pre-releases on push to the main branch using the next
npm dist tag.
You can install these prereleases using a command such as npm install web-features@next
.
Note
This information is for project owners.
Publishing requires the NPM_TOKEN
repository secret.
Set the secret by running gh secret set --repo=web-platform-dx/web-features NPM_TOKEN
,
which prompts you to paste the secret,
or via the repository settings (Settings → Secrets and variables → Actions).
If you're replacing this token, then use the following settings:
Setting | Value |
---|---|
Token type | Granular Access Token |
Expiration | The first day of the next quarter (1 January, 1 April, 1 July, or 1 October) or the first weekday after it |
Packages and scopes permissions | Read and write |
Select packages | Only select packages and scopes |
Select packages and scopes | compute-baseline and web-features |
Organizations | No access |