diff --git a/docs/publishing.md b/docs/publishing.md index 0e929c5eb14..4d86af77c80 100644 --- a/docs/publishing.md +++ b/docs/publishing.md @@ -1,8 +1,28 @@ # Publishing +## Regular releases + +> [!NOTE] +> This information is for [project owners](../GOVERNANCE.md#roles-and-responsibilities). + +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. The "[major version required](https://github.com/web-platform-dx/web-features/pulls?q=is%3Apr+is%3Amerged+label%3A%22major+version+required%22+sort%3Aupdated-desc)" and "[minor version required](https://github.com/web-platform-dx/web-features/pulls?q=is%3Apr+is%3Amerged+label%3A%22minor+version+required%22+sort%3Aupdated-desc)" labels should be used to support this decision. +- Update `packages/web-features/package.json` and `packages/web-features/package-lock.json` in a PR and get review. +- Merge the PR and draft a new release at https://github.com/web-platform-dx/web-features/releases/new +- Fill in the tag name `vX.Y.Z` manually as both the tag and release title +- For major releases, add a "Breaking Changes" section up top. +- For minor releases, add a "What's New" section up top. +- Click "Generate release notes" +- Search for "<" and make sure all element names are quoted with backquotes +- Remove all lines from Dependabot +- Publish the GitHub release + +Publishing the GitHub release creates the tag. This triggers the [Publish web-features GitHub Actions workflows](https://github.com/web-platform-dx/web-features/blob/main/.github/workflows/publish_web-features.yml), uploads GitHub release artifacts and publishes the package to NPM. + ## `@next` releases -The [`publish_next_` GitHub Actions workflows](https://github.com/web-platform-dx/web-features/tree/main/.github/workflows) automatically publish pre-releases on push to the main branch using the `next` [npm dist tag](https://docs.npmjs.com/adding-dist-tags-to-packages). +The [Publish web-features@next GitHub Actions workflows](https://github.com/web-platform-dx/web-features/blob/main/.github/workflows/publish_next_web-features.yml) automatically publish pre-releases on push to the main branch using the `next` [npm dist tag](https://docs.npmjs.com/adding-dist-tags-to-packages). You can install these prereleases using a command such as `npm install web-features@next`. ## Secrets