Skip to content

Commit 4cbd583

Browse files
committed
Add semver workflow
1 parent e6ef55e commit 4cbd583

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/semver.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Check semver
2+
on:
3+
pull_request:
4+
merge_group:
5+
workflow_dispatch:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
semver:
16+
name: Check semver
17+
runs-on: ubuntu-24.04
18+
timeout-minutes: 20
19+
defaults:
20+
run:
21+
shell: bash
22+
steps:
23+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24+
with:
25+
persist-credentials: false
26+
fetch-depth: 0
27+
28+
- uses: mozilla/actions/rust@25cb84d060946c0ad6d2c3f79da479b16d180d71 # v1.1.0
29+
with:
30+
tools: cargo-semver-checks
31+
token: ${{ github.token }}
32+
33+
- uses: mozilla/actions/nss@25cb84d060946c0ad6d2c3f79da479b16d180d71 # v1.1.0
34+
with:
35+
version-file: min_version.txt
36+
token: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Check semver
39+
env:
40+
BASE_REF: ${{ github.event.pull_request.base.ref || github.event.repository.default_branch }}
41+
run: |
42+
# shellcheck disable=SC2086
43+
cargo semver-checks --default-features --baseline-rev "origin/$BASE_REF"

0 commit comments

Comments
 (0)