Skip to content

Latest commit

 

History

History
82 lines (64 loc) · 2.01 KB

File metadata and controls

82 lines (64 loc) · 2.01 KB

Release Cheat Sheet

Before Release

git status                    # All changes committed?
cargo test                    # Tests pass?
cargo fmt                     # Code formatted?

Preview Release

cargo release patch           # Shows what will happen

Execute Release

# Patch release (0.1.17 → 0.1.18)
cargo release patch --execute

# Minor release (0.1.17 → 0.2.0)
cargo release minor --execute

# Major release (0.1.17 → 1.0.0)
cargo release major --execute

Note: Always specify patch/minor/major.

What Happens Automatically

  1. ✅ Bumps version in Cargo.toml
  2. ✅ Runs tests: cargo test
  3. ✅ Checks formatting: cargo fmt --check
  4. ✅ Updates CHANGELOG.md
  5. ✅ Publishes to crates.io
  6. ✅ Creates commit: Release vX.Y.Z
  7. ✅ Creates tag: vX.Y.Z
  8. ✅ Pushes to remote

Skip Publishing

cargo release patch --execute --no-publish    # Don't publish to crates.io
cargo release patch --execute --no-push       # Don't push to Git

After Release

Check on GitHub:

  • New release in "Releases" tab
  • New tag in "Tags" tab
  • New commit on main branch

Check on crates.io:

Troubleshooting

Issue Fix
"Uncommitted changes" git add . && git commit -m "msg"
"No commits since last release" Make some commits first
"crates.io already has this version" Bump the version
"Failed to push" Check push access and branch
"Failed to publish" Run cargo login

Advanced Options

cargo release --help          # Full help
cargo release --dry-run       # Preview without changes
cargo release --allow-dirty   # Skip git status check
cargo release --sign-commit   # GPG sign commits
cargo release --sign-tag      # GPG sign tags

Config Files

  • release.toml - Release automation configuration
  • RELEASE.md - Full documentation
  • CHANGELOG.md - Release notes (auto-updated)

Quick tip: Always run cargo release patch first to preview!