From ba51735a7df4c8fedce70ee7c9a114cfd2766bbf Mon Sep 17 00:00:00 2001 From: Eric Rodrigues Pires Date: Mon, 22 Dec 2025 18:05:58 -0300 Subject: [PATCH] [skip ci] Prepare Trusted Publishing --- .github/workflows/release.yml | 10 ++++++++-- .github/workflows/validate.yml | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2898f23..f534e9c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,3 @@ -name: Release - on: push: tags: ["v*.*.*"] @@ -20,6 +18,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + id-token: write steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: @@ -34,3 +33,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} REF_NAME: ${{ github.ref_name }} run: gh release create "${REF_NAME}" ./out/sandhole-* --draft --verify-tag + - name: Authenticate to crates.io + uses: rust-lang/crates-io-auth-action@b7e9a28eded4986ec6b1fa40eeee8f8f165559ec # v1.0.3 + id: auth + - name: Publish on crates.io + run: cargo publish + env: + CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 5aaaca6..16d5d0a 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -157,6 +157,7 @@ jobs: - build-msrv-no-default-features - tests-nightly - coverage-nightly + # - nix-flake-check # Redundant (and slow) checks uses: ./.github/workflows/build.yml secrets: dockerhub-push-token: ${{ secrets.DOCKERHUB_PUSH_TOKEN }} -- 2.51.2