# Releasing
How a maintainer cuts a Drove release.
## 1. Cut the release
1. Bump `version` in `Cargo.toml`.
2. Move the `[Unreleased]` entries in `CHANGELOG.md` under a new
`## [X.Y.Z] - YYYY-MM-DD` heading, and add fresh compare/tag links at the
bottom of the file. cargo-dist uses this section's body as the GitHub
release notes.
3. Commit both files on `main`.
4. Tag and push: `git tag vX.Y.Z && git push origin vX.Y.Z`.
## 2. What the tag triggers
Pushing a `vX.Y.Z` tag runs two workflows:
- **`release.yml`** (generated by [cargo-dist](https://opensource.axo.dev/cargo-dist/),
do not hand-edit it — see below): builds binaries for every target in
`dist-workspace.toml`, creates the shell and PowerShell installers, opens
the GitHub release with those assets, and pushes the Homebrew formula to
`radiator-engineering/homebrew-tap`.
- **`publish-crate.yml`**: runs `cargo publish --locked`, putting the crate
on crates.io.
## 3. Repository secrets
Both workflows need a secret, set once with `gh secret set NAME`:
- `HOMEBREW_TAP_TOKEN`: a fine-grained GitHub PAT with `Contents: read and
write` on `radiator-engineering/homebrew-tap`. cargo-dist uses it to push
the updated formula after each release.
- `CARGO_REGISTRY_TOKEN`: a crates.io API token with the `publish-new` and
`publish-update` scopes. `publish-crate.yml` uses it for `cargo publish`.
## 4. Changing the release workflow
`dist-workspace.toml` is the source of truth; `.github/workflows/release.yml`
is generated from it. To change the release workflow, edit
`dist-workspace.toml` and regenerate:
```sh
dist init --yes
dist generate
```
Then diff the result before committing.
## 5. Verify each install method
After the workflows finish, check every method the README advertises:
```sh
brew install radiator-engineering/tap/drove
cargo install drove
cargo binstall drove
cargo install --path .
```
For each, confirm `drove --version` reports the new version.