From 6b9b08cf1c5876122f0f1f5cb5f350f4d3eb79e0 Mon Sep 17 00:00:00 2001 From: Jacob Latonis Date: Tue, 21 Apr 2026 21:25:23 -0400 Subject: [PATCH] feat: implement trusted publishing for crate --- .github/workflows/publish.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c2a0efd..aee2956 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,16 +1,16 @@ +name: Publish to crates.io on: - release: - types: [published] - -name: Latest Release Build - + push: + tags: ['v*'] # Triggers when pushing tags starting with 'v' jobs: publish: - name: Publish to crates.io runs-on: ubuntu-latest + permissions: + id-token: write # Required for OIDC token exchange steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - - uses: katyo/publish-crates@v2 - with: - registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} \ No newline at end of file + - uses: actions/checkout@v6 + - uses: rust-lang/crates-io-auth-action@v1 + id: auth + - run: cargo publish + env: + CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}