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