Skip to content

Commit c7f81c7

Browse files
committed
Publish package on crates.io with oidc authentication
Signed-off-by: Gaëtan Lehmann <[email protected]>
1 parent 59c7fd9 commit c7f81c7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,21 @@ on:
99
permissions: {}
1010

1111
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
environment: release
15+
permissions:
16+
id-token: write # Required for OIDC token exchange
17+
steps:
18+
- uses: actions/checkout@v5
19+
with:
20+
persist-credentials: false
21+
- uses: rust-lang/crates-io-auth-action@e919bc7605cde86df457cf5b93c5e103838bd879
22+
id: auth
23+
- run: cargo publish
24+
env:
25+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
26+
1227
# The create-release job runs purely to initialize the GitHub release itself,
1328
# and names the release after the `x.y.z` tag that was pushed. It's separate
1429
# from building the release so that we only create the release once.

0 commit comments

Comments
 (0)