From 19dbd6592b2c920f309e3b1ce166734ede036b93 Mon Sep 17 00:00:00 2001 From: Jose Storopoli Date: Wed, 13 Aug 2025 12:51:47 -0300 Subject: [PATCH] ci: rust trusted publishing --- .github/workflows/release.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aab06a3..a74e476 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,8 +11,10 @@ jobs: github: name: Publish Release on GitHub runs-on: ubuntu-latest + environment: release permissions: contents: write + id-token: write steps: - name: Checkout code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 @@ -31,10 +33,11 @@ jobs: with: persist-credentials: false - - name: Setup Rust - uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable + - name: Set Crates.io Authentication + uses: rust-lang/crates-io-auth-action@e919bc7605cde86df457cf5b93c5e103838bd879 # v1.0.1 + id: auth - - name: Publish to Crates.io - Library - run: cargo publish -p bitcoind-async-client + - name: Publish to Crates.io + run: cargo publish env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}