Skip to content

Commit

Permalink
Merge pull request #226 from nyx-space/fix/rust-release
Browse files Browse the repository at this point in the history
Add Rust release job
  • Loading branch information
ChristopherRabotin committed Apr 3, 2024
2 parents 32d908b + aad60ac commit fcd2471
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 fcd2471

Please sign in to comment.