This project uses cargo-release for version management and publishing.
# Install cargo-release (one time)
cargo install cargo-release
# Preview a patch release (0.5.0 → 0.5.1)
cargo release patch --dry-run
# Execute a patch release
cargo release patch --execute
# Preview a minor release (0.5.0 → 0.6.0)
cargo release minor --dry-run
# Execute a minor release
cargo release minor --execute
# Preview a major release (0.5.0 → 1.0.0)
cargo release major --dry-run
# Execute a major release
cargo release major --executeWhen you run cargo release <version> --execute, it will:
-
✅ Update all version numbers automatically
Cargo.tomlworkspace.package.versionCargo.tomlworkspace.dependencies (nameback-core version)- All three package Cargo.toml files (via workspace inheritance)
-
✅ Run tests - Ensures everything passes before release
-
✅ Create git commit -
chore: release v0.6.0 -
✅ Create git tag -
v0.6.0 -
✅ Publish to crates.io in dependency order:
- First:
nameback-core - Second:
nameback(CLI) - Third:
nameback-gui
- First:
-
✅ Push to GitHub - Commits and tags are pushed
-
✅ Binary release workflow auto-triggers:
The
v*.*.*tag push automatically triggers.github/workflows/release.yml:on: push: tags: - 'v*.*.*'
Monitor the build progress:
gh run list --workflow=release.yml --limit 1 gh run watch # Watch the latest run -
✅ Binary release workflow builds artifacts:
- Builds Windows MSI installer
- Builds macOS DMG files (Intel + Apple Silicon)
- Builds Linux .deb package
- Generates SLSA attestations
- Creates GitHub Release with all artifacts
- Updates Homebrew formulae automatically
Before cargo-release:
# ❌ Had to manually update in 2 places:
[workspace.package]
version = "0.5.0" # Manual update
[workspace.dependencies]
nameback-core = { version = "0.5.0", path = "..." } # Manual updateAfter cargo-release:
# ✅ Just run ONE command:
cargo release patch --execute
# cargo-release automatically updates:
# - workspace.package.version
# - workspace.dependencies.nameback-core.version
# - All package versions (via workspace = true)- Bug fixes
- Documentation updates
- Performance improvements (no API changes)
- Security patches
cargo release patch --execute- New features (backward compatible)
- New public APIs
- Deprecations (but not removals)
cargo release minor --execute- Breaking API changes
- Removal of deprecated features
- Major architectural changes
cargo release major --executeAlways preview first:
cargo release minor --dry-runThis shows you:
- What version changes will be made
- Which files will be modified
- What git operations will happen
- Publishing order
You run cargo-release
↓
Updates all Cargo.toml versions
↓
Runs cargo test
↓
Creates git commit + tag (v0.6.0)
↓
Publishes nameback-core to crates.io
↓
Publishes nameback (CLI) to crates.io
↓
Publishes nameback-gui to crates.io
↓
Pushes tag (v0.6.0) to GitHub
↓
✅ Tag push auto-triggers release workflow
↓
GitHub Actions release workflow starts
↓
Builds Windows MSI
↓
Builds macOS DMG (Intel + ARM)
↓
Builds Linux .deb
↓
Generates SLSA attestations
↓
Creates GitHub Release
↓
Updates Homebrew formulae
↓
✅ DONE!
The release.toml file controls cargo-release behavior:
[workspace]
allow-branch = ["main"] # Only release from main
consolidate-commits = true # Single commit for all packages
tag-name = "v{{version}}" # Tag format
dependent-version = "upgrade" # Update workspace deps automatically-
Install cargo-release:
cargo install cargo-release
-
Configure crates.io token:
cargo login # Enter your crates.io API token -
Ensure clean git state:
git status # Should show "nothing to commit, working tree clean"
CARGO_REGISTRY_TOKEN- For automated crates.io publishing in CI
# 1. Ensure you're on main with latest changes
git checkout main
git pull origin main
# 2. Preview the release
cargo release minor --dry-run
# 3. Execute if everything looks good
cargo release minor --execute
# 4. Monitor GitHub Actions
gh run list --workflow=release.yml --limit 1# Quick patch release for critical bug fix
git checkout main
git pull origin main
cargo release patch --execute# Test locally before releasing
cargo test --workspace
cargo build --release --workspace
cargo doc --workspace --no-deps
# Then release
cargo release patch --execute# Commit or stash your changes first
git status
git add .
git commit -m "feat: your changes"# Switch to main branch
git checkout main
git pull origin mainCheck:
cargo logintoken is valid- You have publish permissions for nameback-* crates
- No version conflicts on crates.io
# Fix tests first
cargo test --workspace
# Then retry release
cargo release patch --executeCheck:
- Workflow logs:
gh run view --log-failed - CARGO_REGISTRY_TOKEN secret is set
- Build dependencies installed correctly
If cargo-release fails and you need to release manually:
# 1. Update versions manually in Cargo.toml files
# 2. Commit changes
git add Cargo.toml */Cargo.toml Cargo.lock
git commit -m "chore: release v0.5.1"
# 3. Create and push tag
git tag -a v0.5.1 -m "Release v0.5.1"
git push origin main
git push origin v0.5.1
# 4. Publish manually (in dependency order)
cd nameback-core && cargo publish && cd ..
cd nameback-cli && cargo publish && cd ..
cd nameback-gui && cargo publish && cd ..# View published versions
cargo search namebackOr visit:
- https://crates.io/crates/nameback
- https://crates.io/crates/nameback-core
- https://crates.io/crates/nameback-gui
gh release view v0.5.1# Download artifact and verify
gh attestation verify nameback-x86_64-pc-windows-msvc.msi --owner <your-github-username>