Skip to content

Latest commit

 

History

History
88 lines (61 loc) · 1.55 KB

RELEASING.md

File metadata and controls

88 lines (61 loc) · 1.55 KB

Release Process

This document outlines the steps for creating and publishing a new release.

Prerequisites

Install required tools:

cargo install git-cliff cargo-edit

Creating a Release

  1. Update main branch:
git checkout main
git pull origin main
  1. Update version:
# Set new version in Cargo.toml - replace 1.2.0 with target version
cargo set-version 1.2.0
cargo check  # Ensure everything builds correctly
  1. Generate changelog:
# Generate/update for new version
git cliff --prepend CHANGELOG.md --unreleased --tag v1.2.0
  1. Create release branch and commit:
git checkout -b release/v1.2.0
git add Cargo.toml Cargo.lock CHANGELOG.md
git commit -m "chore(release): prepare for v1.2.0"
git push origin release/v1.2.0
  1. Create PR from release branch to main and get it reviewed/merged

Publishing

After merge to main:

  1. Tag release:
git checkout main
git pull origin main
git tag -a v1.2.0 -m "Release v1.2.0"
git push origin v1.2.0
  1. Publish to crates.io:
# Verify package contents
cargo package

# Login if haven't already
cargo login

# Publish package
cargo publish

# If using workspace, cd to package directory first
cd my-package  # if needed
cargo publish
  1. Clean up:
git branch -d release/v1.2.0

Notes

  • Use conventional commits (feat:, fix:, etc.) for better changelog organization
  • Version numbers in above commands should be replaced with actual target version
  • If using workspaces, publish command must be run from package directory