Skip to content

Commit

Permalink
.github/: Add Semver to CI steps (#2635)
Browse files Browse the repository at this point in the history
  • Loading branch information
maschad committed May 12, 2022
1 parent d69681b commit 1a6fd75
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -172,3 +172,26 @@ jobs:

- name: Check formatting
run: cargo fmt -- --check

rustsemver:
runs-on: ubuntu-latest
steps:

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-04-20
override: true
components: rustc-dev,llvm-tools-preview

- name: Install semver
run: cargo install semver

- name: Fetch the version in the manifest
run: eval "current_version=$(grep -e '^version = .*$' Cargo.toml | cut -d ' ' -f 3)"

- name: Enforce semantic versioning
run: cargo semver | tee semver_out

- name: Check for semantic versioning errors
run: (head -n 1 semver_out | grep "\-> $current_version") || (echo "versioning mismatch" && return 1)

0 comments on commit 1a6fd75

Please sign in to comment.