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 }}