Skip to content

Commit cbd6c26

Browse files
committed
chore: Add trusted publishing workflow
1 parent 09a5037 commit cbd6c26

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags: ["*"]
6+
7+
jobs:
8+
publish:
9+
name: Publish to crates.io
10+
runs-on: ubuntu-latest
11+
environment: publish
12+
permissions:
13+
# Required for OIDC token exchange
14+
id-token: write
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v5
18+
- name: Authenticate with crates.io
19+
id: auth
20+
uses: rust-lang/crates-io-auth-action@v1
21+
- name: Publish to crates.io
22+
env:
23+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
24+
run: cargo publish

0 commit comments

Comments
 (0)