Skip to content

Commit

Permalink
chore(release): add RELEASING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cmackenzie1 committed Jan 25, 2025
1 parent 6faf513 commit 7c98dfb
Showing 1 changed file with 88 additions and 0 deletions.
88 changes: 88 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Release Process

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

## Prerequisites

Install required tools:

```bash
cargo install git-cliff cargo-edit
```

## Creating a Release

1. Update main branch:

```bash
git checkout main
git pull origin main
```

2. Update version:

```bash
# 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
```

3. Generate changelog:

```bash
# Generate/update for new version
git cliff --tag v1.2.0 --output CHANGELOG.md
```

4. Create release branch and commit:

```bash
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
```

5. Create PR from release branch to main and get it reviewed/merged

## Publishing

After merge to main:

1. Tag release:

```bash
git checkout main
git pull origin main
git tag -a v1.2.0 -m "Release v1.2.0"
git push origin v1.2.0
```

2. Publish to crates.io:

```bash
# 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
```

3. Clean up:

```bash
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

0 comments on commit 7c98dfb

Please sign in to comment.