# Releasing
Every merged pull request is released.
1. The pull request already carries the new version in `Cargo.toml` and its
entry in `CHANGELOG.md` (see [CONTRIBUTING.md](CONTRIBUTING.md)), and every
CI check on it is green.
2. Merge it into `main`.
3. Create a GitHub release on that commit of `main`, with the tag
`v<version>` (for example `v1.3.0`) and the changelog entry as its notes:
```sh
gh release create v1.3.0 --target main --title "clickhouse-native-rs 1.3.0" --notes-file notes.md
```
4. Publishing the release runs `.github/workflows/release.yml`. The workflow
- refuses a commit that is not on `main` and a tag that differs from the
package version;
- skips a version that crates.io already has;
- gets a short-lived crates.io token through trusted publishing (no token
is stored in the repository) and runs `mitts publish`.
5. Check that the version appears on
[crates.io](https://crates.io/crates/clickhouse-native-rs) and that
[docs.rs](https://docs.rs/clickhouse-native-rs) built it.
A new major version, renaming the crate and yanking a version are decided by
the maintainer case by case.