Skip to content

Commit 13cca96

Browse files
committed
chore: add GitHub release workflow and crates.io publishing
1 parent cfe3000 commit 13cca96

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Create GitHub Release and Publish to crates.io
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
7+
jobs:
8+
github-release:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
steps:
13+
- uses: actions/checkout@v5
14+
15+
- id: create-release
16+
run: gh release create ${{ github.ref_name }} --title "${{ github.ref_name }}" --generate-notes
17+
env:
18+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
20+
publish:
21+
runs-on: ubuntu-latest
22+
# environment: release # Optional: for enhanced security
23+
permissions:
24+
id-token: write
25+
steps:
26+
- uses: actions/checkout@v5
27+
- uses: rust-lang/crates-io-auth-action@v1
28+
id: auth
29+
- run: cargo publish
30+
env:
31+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

0 commit comments

Comments
 (0)