We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9d5ea0 commit d471942Copy full SHA for d471942
1 file changed
.github/workflows/publish.yml
@@ -1,21 +1,18 @@
1
-name: Publish crate
2
-
+name: Publish to crates.io
3
on:
4
push:
5
- tags:
6
- - "v*"
7
+ tags: ['v*'] # Triggers when pushing tags starting with 'v'
8
jobs:
9
publish:
10
runs-on: ubuntu-latest
+ environment: release # Optional: for enhanced security
11
permissions:
+ id-token: write # Required for OIDC token exchange
12
contents: read
13
- id-token: write
14
15
steps:
16
- - uses: actions/checkout@v4
17
18
- - uses: dtolnay/rust-toolchain@stable
19
20
- - name: Publish to crates.io
21
- run: cargo publish --locked
+ - uses: actions/checkout@v6
+ - uses: rust-lang/crates-io-auth-action@v1
+ id: auth
+ - run: cargo publish
+ env:
+ CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
0 commit comments