Skip to content

Commit

Permalink
CI: Verify semver compatibility when tags is pushed
Browse files Browse the repository at this point in the history
Add a job that checks compatibility when a tag is pushed.
The command executed is just
`cargo semver-checks -p scylla -p scylla-cql` because it's behavior is
exactly what we want. It gets current version from Cargo.toml,
calculates previous version (unless current version is on crates.io -
which should not be the case) and checks that the release type
(major / minor / patch) is correct.
  • Loading branch information
Lorak-mmk committed Jan 24, 2024
1 parent fee2c64 commit 7e92cc2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/semver_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main
- 'branch-*'
push:
tags:
- v*.*.*

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -71,3 +74,14 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}

semver-push-tag:
runs-on: ubuntu-latest
if: github.event_name == 'push'
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Install semver-checks
run: cargo install cargo-semver-checks --no-default-features
- name: Verify that's it's safe to publish the version.
run: cargo semver-checks -p scylla -p scylla-cql

0 comments on commit 7e92cc2

Please sign in to comment.