From b33353eeb2cef49f8fec11e4aed24169f7640ce5 Mon Sep 17 00:00:00 2001 From: Yago Iglesias Date: Sat, 31 Aug 2024 19:29:13 +0200 Subject: [PATCH] ci: cargo publish on release --- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 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..2629a44 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: release to crates.io +on: + release: + types: [created] + +env: + CARGO_TERM_COLOR: always + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Install the Rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Rust Cache Action + uses: Swatinem/rust-cache@v2 + + - name: Publish + run: cargo publish --token $CRATES_IO_TOKEN + env: + CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}