From 34e0c3f83d9ad25e8225f8b7edaa8bcfea28643b Mon Sep 17 00:00:00 2001 From: Yago Iglesias Date: Sat, 31 Aug 2024 19:29:30 +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 }}