Skip to content

Commit 22a78ad

Browse files
Frandoclaude
andcommitted
chore: add release-please workflow for automated releases
Automates version bumping, changelog generation, and crates.io publishing. The workflow maintains a release PR that tracks conventional commits since the last release. Merging the PR creates a GitHub Release with tag and publishes to crates.io. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b3c9cf3 commit 22a78ad

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
release-please:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
release_created: ${{ steps.release.outputs.release_created }}
16+
tag_name: ${{ steps.release.outputs.tag_name }}
17+
steps:
18+
- uses: googleapis/release-please-action@v4
19+
id: release
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
publish:
24+
needs: release-please
25+
if: ${{ needs.release-please.outputs.release_created }}
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v6
29+
30+
- uses: dtolnay/rust-toolchain@stable
31+
32+
- name: Publish patchbay to crates.io
33+
run: cargo publish -p patchbay
34+
env:
35+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.4.0"
3+
}

release-please-config.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"packages": {
3+
".": {
4+
"release-type": "rust",
5+
"component": "patchbay",
6+
"changelog-path": "CHANGELOG.md",
7+
"bump-minor-pre-major": true,
8+
"bump-patch-for-minor-pre-major": true,
9+
"extra-files": [
10+
"Cargo.lock",
11+
"patchbay/Cargo.toml"
12+
]
13+
}
14+
},
15+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
16+
}

0 commit comments

Comments
 (0)