Skip to content

Commit db4a563

Browse files
committed
Add workflow to publish release on tag
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent 26dc2b3 commit db4a563

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Create GitHub release and publish on Crates.io
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "v*.*.*"
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
environment: release
13+
permissions:
14+
id-token: write
15+
steps:
16+
- uses: actions/checkout@v5
17+
- uses: rust-lang/crates-io-auth-action@v1
18+
id: auth
19+
- run: cargo publish
20+
env:
21+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
22+
23+
- name: Create a GitHub release
24+
uses: softprops/action-gh-release@v2
25+
with:
26+
generate_release_notes: true
27+
draft: false

0 commit comments

Comments
 (0)