File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 branches :
1515 - trunk
1616 tags :
17- - " * "
17+ - " [0-9]+.[0-9]+.[0-9]+ "
1818
1919 workflow_dispatch :
2020
@@ -158,7 +158,11 @@ jobs:
158158
159159 publish_cargo :
160160 name : Publish [Cargo]
161+ if : startsWith(github.ref, 'refs/tags/')
161162 runs-on : ubuntu-24.04
163+ environment : release
164+ permissions :
165+ id-token : write
162166 steps :
163167 - name : Checkout
164168 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -167,8 +171,10 @@ jobs:
167171 uses : dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9
168172 with :
169173 toolchain : 1.94.0
170- - name : Dry run
171- run : cargo publish --all-features --dry-run
174+ - name : Authorize with crates.io
175+ uses : rust-lang/crates-io-auth-action@b7e9a28eded4986ec6b1fa40eeee8f8f165559ec # v1.0.3
176+ id : auth
172177 - name : Publish to crates.io
173- if : startsWith(github.ref, 'refs/tags/')
174- run : cargo publish --all-features --token ${{ secrets.CRATES_IO_API_TOKEN }}
178+ run : cargo publish --all-features
179+ env :
180+ CARGO_REGISTRY_TOKEN : ${{ steps.auth.outputs.token }}
You can’t perform that action at this time.
0 commit comments