Skip to content

Commit f9c0f03

Browse files
authored
Merge pull request #37 from hotdata-dev/add-trusted-publishing
feat(ci): add trusted publishing workflow
2 parents d4e5868 + 08b24d8 commit f9c0f03

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish:
10+
name: Publish to crates.io
11+
runs-on: ubuntu-latest
12+
environment: release
13+
permissions:
14+
id-token: write
15+
contents: read
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install Rust
20+
uses: dtolnay/rust-toolchain@stable
21+
22+
- name: Get crates.io token
23+
uses: rust-lang/crates-io-auth-action@v1
24+
id: auth
25+
26+
- name: Publish
27+
run: cargo publish
28+
env:
29+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

0 commit comments

Comments
 (0)