Skip to content

Commit 3e90876

Browse files
committed
CI: Verify semver compatibility when tags is pushed
Add a job that checks compatibility when a tag is pushed. 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.
1 parent 509941a commit 3e90876

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/semver_checks.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
branches:
88
- main
99
- 'branch-*'
10+
push:
11+
tags:
12+
- v*.*.*
1013

1114
env:
1215
CARGO_TERM_COLOR: always
@@ -79,3 +82,14 @@ jobs:
7982
env:
8083
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8184
GH_REPO: ${{ github.repository }}
85+
86+
semver-push-tag:
87+
runs-on: ubuntu-latest
88+
if: github.event_name == 'push'
89+
timeout-minutes: 30
90+
steps:
91+
- uses: actions/checkout@v3
92+
- name: Install semver-checks
93+
run: cargo install cargo-semver-checks --no-default-features
94+
- name: Run semver-checks to see if it agrees with version updates
95+
run: make semver-version

0 commit comments

Comments
 (0)