Skip to content

Commit f237e09

Browse files
committed
Use trusted publishing
1 parent 166b0e8 commit f237e09

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
# Copied from https://crates.io/docs/trusted-publishing
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
environment: release # Optional: for enhanced security
12+
permissions:
13+
id-token: write # Required for OIDC token exchange
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: rust-lang/crates-io-auth-action@v1
17+
id: auth
18+
- run: cargo publish
19+
env:
20+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

0 commit comments

Comments
 (0)