diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 00000000..76824b6c --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,7 @@ +changelog: + exclude: + labels: + - dependencies + - skip-changelog + authors: + - "dependabot[bot]" diff --git a/docs/releasing.md b/docs/releasing.md index 6fd83762..8b3ad3c2 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -25,26 +25,42 @@ npm run test If all goes well, you are ready to go! -To release a new version of llhttp, first increase the version using `npm` and make sure it also executes the `postversion` script. Unless you have some very specific setup, this should happen automatically, which means the following command will suffice: +Before releasing, make sure you are on an up-to-date `main` branch with a clean working tree. Check `git remote -v` and identify the remote that points to `nodejs/llhttp`, not your fork. + +To release a new version of llhttp, first increase the version using `npm` and make sure it also executes the `postversion` script. Set `REMOTE` to the official repository's remote name. For example, if it is named `upstream`, run: ``` -npm version [major|minor|patch] +REMOTE=upstream npm version [major|minor|patch] ``` -The command will increase the version and then will create a new release branch on GitHub. +Replace `[major|minor|patch]` with the appropriate version increment. + +The command increases the version, creates a commit and tag, builds the release, updates the `release` branch, creates the `release/v` tag, and pushes to the selected remote. It then returns to `main`. + +> This is not a local-only version bump. `REMOTE` defaults to `origin`, regardless of the branches' tracking configuration. If `origin` points to your fork, you must override it to publish to the official repository. The build also removes and regenerates the `build/` and `release/` directories. > Even thought there is a package on NPM, it is not updated anymore. NEVER RUN `npm publish`! -It's now time to create the release on GitHub. If you DON'T have GitHub CLI available, skip to the next section, otherwise run the following command: +It's now time to create the release on GitHub. If you DON'T have GitHub CLI available, skip to [Create a GitHub release without GitHub CLI](#create-a-github-release-without-github-cli), otherwise run the following command: ``` -npm run github-release +GH_REPO=nodejs/llhttp npm run github-release ``` -This command will create a draft release on GitHub and then show it in your browser so you can review and publish it. +`GH_REPO` explicitly selects the repository used by GitHub CLI. It is independent of `REMOTE` and prevents the release from being created in your fork. + +This command will create a draft release on GitHub and then show it in your browser so you can review and publish it. Check the release notes and confirm that the final tag is `release/v`. Congratulations, you are all set! +## Excluding changes from release notes + +Automatically generated release notes use the exclusions in [`.github/release.yml`](../.github/release.yml). Pull requests authored by `dependabot[bot]` or labeled `dependencies` or `skip-changelog` are excluded. + +GitHub filters pull requests by label or author, not by commit message prefixes such as `build(...)`. Add `skip-changelog` to other pull requests that should be omitted, or edit the draft notes manually. + +Changing the configuration does not update existing draft notes automatically. Regenerate or edit them before publishing. + ## Create a GitHub release without GitHub CLI > From now on, `$VERSION` will be the new version you are trying to create, including the leading letter, for instance `v6.0.9`.