Skip to content

Commit f93367e

Browse files
authored
ci: Set up crates.io trusted publishing (#46)
1 parent 626a99a commit f93367e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/rust-release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
# Required for OIDC token exchange
13+
id-token: write
14+
steps:
15+
- uses: actions/checkout@v5
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)