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