Skip to content

Publishing docs: update steps for new release workflow #2196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 36 additions & 20 deletions docs/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,62 @@
> [!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:
These are the steps to publish a regular release on npm and as a GitHub release:

1. 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)
- 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 or `support` objects.

Changes to `data.schema.json` often indicates a major or minor version is required.
The "[major version required][major-version]" and "[minor version required][minor-version]" labels should be used to support this decision.

1. Update `packages/web-features/package.json` and `packages/web-features/package-lock.json` in a PR and get review.
1. Merge the PR and draft a new release at https://github.com/web-platform-dx/web-features/releases/new.
1. Fill in the tag name `vX.Y.Z` manually as both the tag and release title.
1. For minor releases, add a `## What's New` section to the top of the release notes, before all other sections.
1. For major releases, add a `## Breaking Changes` section to the top of the release notes, before all other sections.
1. Click **Generate release notes**.
1. In the release description, find unescaped `<` characters and make sure that HTML elements are enclosed with backticks.
1. Trigger the [Prepare web-features release workflow](https://github.com/web-platform-dx/web-features/actions/workflows/prepare_release.yml).

This regular expression can help:
1. Click the **Run workflow** dropdown.
1. Choose the semver level.
1. Click the **Run workflow** button.

```regex
/ (?<!`)<(.*?)> /
```
When the workflow finishes, your review is requested on a new release pull request.

1. Review the PR.

1. Close and reopen the relase PR, to allow the tests to run.
Copy link
Contributor

@szepeviktor szepeviktor Nov 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ddbeck A new typo here: "relase"
#1825

1. Review and approve the changes.
1. When you're ready to complete the remaining steps, merge the PR.

1. Create the GitHub release.

1. Go to https://github.com/web-platform-dx/web-features/releases/new to start a new draft release.
1. Fill in the tag name `vX.Y.Z` manually as both the tag and release title.
1. For minor releases, add a `## What's New` section to the top of the release notes, before all other sections.
1. For major releases, add a `## Breaking Changes` section to the top of the release notes, before all other sections.
1. Click **Generate release notes**.
1. In the release description, find unescaped `<` characters and make sure that HTML elements are enclosed with backticks.

This regular expression can help:

```regex
/ (?<!`)<(.*?)> /
```

1. Remove all lines from Dependabot.
Comment on lines +41 to +52
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to target these steps for automation next. 😈

1. Click **Publish 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.

1. Remove all lines from Dependabot.
1. Publish the GitHub release.
1. (*Optional*) If this release contained schema changes, notify highly-visible donwstream consumers, such as Can I Use (@Fryd), MDN (@LeoMcA), or webstatus.dev (@jcscottiii).
1. Remove the "[major version required][major-version]" and "[minor version required][minor-version]" labels from any pull requests that were included in the release.

1. (*Optional*) If this release contained schema changes, notify highly-visible donwstream consumers, such as Can I Use (@Fryd), MDN (@LeoMcA), or webstatus.dev (@jcscottiii).

[major-version]: https://github.com/web-platform-dx/web-features/pulls?q=is%3Apr+is%3Amerged+label%3A%22major+version+required%22+sort%3Aupdated-desc
[minor-version]: https://github.com/web-platform-dx/web-features/pulls?q=is%3Apr+is%3Amerged+label%3A%22minor+version+required%22+sort%3Aupdated-desc

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 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).
Expand Down