Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

Commit c84fe86

Browse files
shikharclaude
andcommitted
chore: automate releases with release-plz
Replace manual release skill with release-plz automation. On push to main, release-plz creates/updates a release PR. When merged, it tags the release triggering the existing CI. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent c95a2dd commit c84fe86

6 files changed

Lines changed: 86 additions & 23 deletions

File tree

.claude/commands/release.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/release-plz.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: release-plz
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
pull-requests: write
10+
contents: write
11+
12+
jobs:
13+
release-plz:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Install Rust
22+
uses: dtolnay/rust-toolchain@stable
23+
24+
- name: Run release-plz
25+
uses: release-plz/action@v0.5
26+
with:
27+
command: release-pr
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-tag.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: release-tag
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
release-tag:
9+
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Install Rust
20+
uses: dtolnay/rust-toolchain@stable
21+
22+
- name: Run release-plz release
23+
uses: release-plz/action@v0.5
24+
with:
25+
command: release
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ tempfile = "3.24"
5151

5252
[profile.release]
5353
lto = true
54+

RELEASING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Releasing
2+
3+
Releases are automated via [release-plz](https://release-plz.dev/).
4+
5+
## How it works
6+
7+
1. Push commits to `main` using [conventional commits](https://www.conventionalcommits.org/)
8+
- `feat:` → minor version bump
9+
- `fix:` → patch version bump
10+
- `feat!:` or `BREAKING CHANGE:` → major version bump
11+
12+
2. release-plz automatically creates/updates a release PR with:
13+
- Version bump in Cargo.toml
14+
- Updated CHANGELOG.md
15+
16+
3. When you merge the release PR:
17+
- release-plz creates a git tag
18+
- The tag triggers the release workflow (build, publish to crates.io, update homebrew)
19+
20+
## Manual override
21+
22+
To force a specific version, edit `Cargo.toml` manually in the release PR before merging.

release-plz.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[workspace]
2+
changelog_config = "cliff.toml"
3+
publish = false
4+
git_tag_enable = true
5+
git_tag_name = "{{ version }}"
6+
git_release_enable = false
7+
pr_labels = ["release"]

0 commit comments

Comments
 (0)