From aecc516be7def114a10dbb3c2c4425e461449b71 Mon Sep 17 00:00:00 2001 From: Jim Turner Date: Sun, 14 Dec 2025 18:12:47 -0500 Subject: [PATCH] Add release workflow for trusted publishing See https://crates.io/docs/trusted-publishing --- .github/workflows/release.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1e6d707 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,17 @@ +name: Publish to crates.io +on: + push: + tags: ['v*'] # Triggers when pushing tags starting with 'v' +jobs: + publish: + runs-on: ubuntu-latest + environment: release # Optional: for enhanced security + permissions: + id-token: write # Required for OIDC token exchange + steps: + - 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 }}