From dd231a3e28a406371bc0fafb5baf166c229aa351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Sat, 7 Nov 2026 19:08:24 +0100 Subject: [PATCH] Setup Trusted Publishing --- .github/workflows/publish.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..9912c203 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,24 @@ +name: Publish to crates.io + +on: + push: + tags: + - "*" + +jobs: + publish: + runs-on: ubuntu-latest + environment: publish + permissions: + id-token: write # Required for OIDC token exchange + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: rust-lang/crates-io-auth-action@3268eb413133e2960fa4ae0e963ca76380c54cd9 # v1.0.6 + id: auth + - name: Publish to crates.io + run: | + cargo run -p maint -- publish --execute + env: + CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}