File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -469,6 +469,12 @@ jobs:
469469
470470 runs-on : ubuntu-latest
471471
472+ environment : release
473+
474+ permissions :
475+ contents : read
476+ id-token : write # needed for crates.io Trusted Publishing
477+
472478 steps :
473479 - uses : actions/checkout@v6
474480
@@ -479,11 +485,14 @@ jobs:
479485 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > $installer
480486 bash $installer --default-toolchain $(cat rust-toolchain) -y
481487
482- - name : Login
483- run : cargo login ${{ secrets.CRATE_AUTH_TOKEN }}
488+ - name : Authenticate with crates.io
489+ id : auth
490+ uses : rust-lang/crates-io-auth-action@v1
484491
485492 - name : Publish
486493 run : cargo publish
494+ env :
495+ CARGO_REGISTRY_TOKEN : ${{ steps.auth.outputs.token }}
487496
488497 competing_benchmark :
489498 name : Benchmark
You can’t perform that action at this time.
0 commit comments