We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91de857 commit 287e891Copy full SHA for 287e891
.github/workflows/publish.yml
@@ -12,6 +12,10 @@ jobs:
12
publish:
13
if: github.event.release.target_commitish == 'main'
14
runs-on: ubuntu-latest
15
+ environment: publish
16
+ permissions:
17
+ contents: read
18
+ id-token: write
19
steps:
20
- name: Checkout
21
uses: actions/checkout@v6
@@ -54,7 +58,11 @@ jobs:
54
58
- name: Verify tests
55
59
run: cargo +stable test --workspace --all-features --locked
56
60
61
+ - name: Authenticate with crates.io
62
+ id: auth
63
+ uses: rust-lang/crates-io-auth-action@v1
64
+
57
65
- name: Publish to crates.io
66
env:
- CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- run: cargo +stable publish --locked --token "$CARGO_REGISTRY_TOKEN"
67
+ CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
68
+ run: cargo +stable publish --locked
0 commit comments