Skip to content

Latest commit

 

History

History
89 lines (58 loc) · 5.28 KB

publishing.md

File metadata and controls

89 lines (58 loc) · 5.28 KB

Publishing

Regular releases

Note

This information is for project owners.

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

    The "major version required" and "minor version required" labels should be used to support this decision.

  2. Trigger the Prepare web-features release workflow.

    1. Click the Run workflow dropdown.
    2. Choose the semver level.
    3. Click the Run workflow button.

    When the workflow finishes, your review is requested on a new release pull request.

  3. Review the PR.

    1. Close and reopen the release PR, to allow the tests to run.
    2. Review and approve the changes.
    3. When you're ready to complete the remaining steps, merge the PR.
  4. Create the GitHub release.

    1. Go to https://github.com/web-platform-dx/web-features/releases/new to start a new draft release.

    2. Fill in the tag name vX.Y.Z manually as both the tag and release title.

    3. For minor releases, add a ## What's New section to the top of the release notes, before all other sections.

    4. For major releases, add a ## Breaking Changes section to the top of the release notes, before all other sections.

    5. Click Generate release notes.

    6. In the release description, find unescaped < characters and make sure that HTML elements are enclosed with backticks.

      This regular expression can help:

      / (?<!`)<(.*?)> /
    7. Remove all lines from Dependabot.

    8. 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.

  5. Remove the "major version required" and "minor version required" labels from any pull requests that were included in the release.

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

@next releases

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.

Secrets

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 (SettingsSecrets and variablesActions).

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