Skip to content

Commit 3c77377

Browse files
authored
ci: Set up Rust trusted publishing (#128)
1 parent 270e370 commit 3c77377

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/rust-release.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+
on:
3+
push:
4+
# Triggers when pushing tags starting with 'v'
5+
tags: ["v*"]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
environment: rust-release
11+
permissions:
12+
id-token: write # Required for OIDC token exchange
13+
steps:
14+
- uses: actions/checkout@v5
15+
- uses: rust-lang/crates-io-auth-action@v1
16+
id: auth
17+
- run: cargo publish
18+
env:
19+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

0 commit comments

Comments
 (0)