From aad60ac3a3d024eb359a30ed2b32ebf5e9817e65 Mon Sep 17 00:00:00 2001 From: Christopher Rabotin Date: Tue, 2 Apr 2024 23:47:20 -0600 Subject: [PATCH] Add Rust release job --- .github/workflows/rust.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e69fce75..516a793a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -191,3 +191,27 @@ jobs: TOKEN: ${{ secrets.CODECOV_TOKEN }} with: files: ./lcov.txt + + release: + name: Release + runs-on: ubuntu-latest + needs: [check, test, lints, validation, coverage] + + if: "startsWith(github.ref, 'refs/tags/')" + steps: + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Install stable toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: rustfmt, clippy + + - name: Publish to crates.io + env: + TOKEN: ${{ secrets.CRATESIO_API_TOKEN }} + run: | + cargo login $TOKEN + cargo publish + \ No newline at end of file