Skip to content

Commit 3b728c1

Browse files
KSXGitHubclaude
andauthored
ci(deploy): trusted publishing (#423)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent cdb1b88 commit 3b728c1

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)