Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
changelog:
exclude:
labels:
- dependencies
- skip-changelog
authors:
- "dependabot[bot]"
28 changes: 22 additions & 6 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<VERSION>` 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<VERSION>`.

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`.
Expand Down
Loading