Skip to content

Commit 765afd1

Browse files
Add check-version-against-tag workflow
1 parent 79fcf4e commit 765afd1

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on:
2+
workflow_call:
3+
4+
defaults:
5+
run:
6+
shell: bash
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
check:
13+
name: Check VERSION file against latest tag
14+
runs-on: ubuntu-latest
15+
steps:
16+
- runs: actions/checkout@v5
17+
- name: Check VERSION file against latest tag
18+
run: |
19+
python -m pip install dunamai
20+
expected_version="$(python -m dunamai from git --format '{base}')"
21+
if [ "$expected_version" != "$(cat VERSION)" ]; then
22+
echo "Expected VERSION file to be \"$expected_version\", got:"
23+
cat VERSION
24+
exit 1
25+
fi

0 commit comments

Comments
 (0)