Skip to content

Commit 11d1877

Browse files
Add crates.io publish workflow on GitHub release
Triggers on release publish events and runs cargo publish with the CARGO_REGISTRY_TOKEN secret. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 230becf commit 11d1877

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/publish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Publish to crates.io
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: dtolnay/rust-toolchain@stable
16+
- uses: Swatinem/rust-cache@v2
17+
- run: cargo publish
18+
env:
19+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)