-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (42 loc) · 1.26 KB
/
semver.yml
File metadata and controls
48 lines (42 loc) · 1.26 KB
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
48
name: Check semver
on:
pull_request:
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
semver:
name: Check semver
runs-on: ubuntu-24.04
timeout-minutes: 20
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
fetch-depth: 1
fetch-tags: true
sparse-checkout: min_version.txt
sparse-checkout-cone-mode: false
- name: Get latest tag
id: tag
run: |
TAG=$(git tag --sort=-version:refname | head -n 1)
if [ -z "$TAG" ]; then
echo "::error::No tags found; cannot determine semver baseline"
exit 1
fi
echo "ref=$TAG" >> "$GITHUB_OUTPUT"
- uses: mozilla/actions/nss@27cbe8fb5d338c2861b787e5de10410559065db1 # v1.1.3
with:
version-file: min_version.txt
token: ${{ secrets.GITHUB_TOKEN }}
- uses: mozilla/actions/semver@27cbe8fb5d338c2861b787e5de10410559065db1 # v1.1.3
with:
base-ref: ${{ steps.tag.outputs.ref }}