Add check-version-against-tag workflow #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | ||
|
Check failure on line 1 in .github/workflows/check-version-against-tag.yaml
|
||
| workflow_call: | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| check: | ||
| name: Check VERSION file against latest tag | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - runs: actions/checkout@v5 | ||
| - name: Check VERSION file against latest tag | ||
| run: | | ||
| python -m pip install dunamai | ||
| expected_version="$(python -m dunamai from git --format '{base}')" | ||
| if [ "$expected_version" != "$(cat VERSION)" ]; then | ||
| echo "Expected VERSION file to be \"$expected_version\", got:" | ||
| cat VERSION | ||
| exit 1 | ||
| fi | ||