Skip to content

Commit 28a28e3

Browse files
committed
Add GitHub Actions workflow to publish to crates.io
Triggers on GitHub release creation. Runs tests then publishes using the CARGO_REGISTRY_TOKEN secret. https://claude.ai/code/session_019tzejYnzWFARWNgHBZ4fhN
1 parent 4bbb517 commit 28a28e3

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
16+
- uses: dtolnay/rust-toolchain@stable
17+
18+
- run: cargo test
19+
20+
- run: cargo publish
21+
env:
22+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)