Skip to content

Commit

Permalink
Add Rust release job
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherRabotin committed Apr 3, 2024
1 parent 32d908b commit aad60ac
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit aad60ac

Please sign in to comment.