Skip to content

Commit

Permalink
Add release step (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
demetribu authored Oct 2, 2024
1 parent 9f30214 commit 97c2e4c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,31 @@ jobs:

- name: Run cargo tests
run: cargo test --all-features

check:
if: always()
needs: [test, lint]
runs-on: ubuntu-latest
steps:
- name: Check if all needed jobs succeeded
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

release:
needs: [check]
if: "success() && startsWith(github.ref, 'refs/tags/')"
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v2

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v2

- name: Publish to crates.io
run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 comments on commit 97c2e4c

Please sign in to comment.