From 93dd69a2c8702d374b528638c2ae031c34b569ec Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Fri, 1 Aug 2025 17:37:25 +0100 Subject: [PATCH] Add a release GitHub Actions workflow For publishing to crates.io. --- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 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..8945704 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: Publish to crates.io + +on: + push: + tags: ['*.*.*'] + +jobs: + publish: + runs-on: ubuntu-24.04 + + environment: release + + permissions: + id-token: write + + steps: + - uses: actions/checkout@v4 + + - uses: rust-lang/crates-io-auth-action@v1 + id: auth + + - run: cargo publish + env: + CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}