1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: CI
on:
workflow_call:
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
uses: greenticai/.github/.github/workflows/host-crate-ci.yml@main
with:
run-semver-checks: false
semver-checks:
name: Semver Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: Swatinem/rust-cache@v2
- name: Resolve semver baseline tag
id: baseline
shell: bash
run: |
set -euo pipefail
BASELINE_TAG="$(
git tag --list 'v*' --sort=-version:refname \
| grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' \
| head -n1
)"
if [ -z "${BASELINE_TAG}" ]; then
echo "No stable release tag found for semver baseline." >&2
exit 1
fi
echo "Using semver baseline tag: ${BASELINE_TAG}"
echo "baseline_rev=refs/tags/${BASELINE_TAG}" >> "$GITHUB_OUTPUT"
- uses: obi1kenobi/cargo-semver-checks-action@v2
with:
rust-toolchain: 1.95.0
baseline-rev: ${{ steps.baseline.outputs.baseline_rev }}