Release Rust Crate
Publish goosefs-sdk to crates.io. For the Python package, see Release Python.
GitHub Actions (preferred)
Workflow: Publish Rust SDK.
- Bump
versionin rootCargo.tomlandbindings/python/Cargo.toml(keep identical). - Update
CHANGELOG.md. - Merge the workflow file (and the version bump) to
main. GitHub Actions only lists aworkflow_dispatchworkflow after it exists on the default branch. - Ensure CI is green.
- Publish from the Actions UI (below) or push a matching tag:
git tag v0.2.1 && git push origin v0.2.1.
Run from the Actions UI
- Open Actions → Publish Rust SDK → Run workflow.
- First run with dry_run checked (
cargo publish --dry-runonly; nothing is uploaded). - After dry_run succeeds, run again without dry_run to upload.
The first real publish creates the GitHub Environment crates-io. Add Required reviewers on that environment later if you want a human gate.
Auth (configure once): crates.io Trusted Publishing (OIDC) for workflow publish-rust-sdk.yml / environment crates-io, or repository secret CARGO_REGISTRY_TOKEN. The token is enough; do not store a crates.io username.
Script (local)
From the repository root:
# Preflight: version alignment, cargo test, cargo doc, cargo publish --dry-run
bash scripts/release/rust.sh
# Real publish
export CARGO_REGISTRY_TOKEN=... # https://crates.io/settings/tokens
bash scripts/release/rust.sh --publish
| Flag | Meaning |
|---|---|
--publish | Upload to crates.io (default is dry-run only) |
--skip-tests | Skip cargo test |
--allow-dirty | Pass --allow-dirty to cargo publish |
crates.io does not allow overwriting a published version. Never commit tokens; use Trusted Publishing or CARGO_REGISTRY_TOKEN.