# Publishing to crates.io
## One-time setup
1. Log in at https://crates.io with GitHub OAuth
2. Go to Account Settings and generate an API token
3. Run:
```sh
source "$HOME/.cargo/env"
cargo login <your-api-token>
```
## Publish
From this directory:
```sh
source "$HOME/.cargo/env"
cargo publish
```
## Publishing a new version
1. Bump `version` in `Cargo.toml`
2. Commit and push
3. Tag the release: `git tag v<version> && git push origin v<version>`
4. Run `cargo publish`