dev(ci): add nix version check to pre-release ci checks

This commit is contained in:
2025-07-06 23:14:04 +02:00
parent 2f2a2c2696
commit fcc8be77ee

View File

@@ -16,17 +16,33 @@ jobs:
packages: "git"
version: 1.0
- uses: actions/checkout@v4
with:
fetch-tags: true
- name: Check Version Changed
id: check-ver-changed
run: |
GIT_TAG=$(git describe --no-long --abbrev=0 --tags --always)
MAKE_TAG=$(make print-version)
NIX_VER=$(sed -nE \
's/.*version\s*=\s*"([0-9.]*)".*/\1/p' \
assets/pkg/nix/module.nix
)
if [[ "$GIT_TAG" == "v$MAKE_TAG" ]]; then
echo "ERR: Git tag matches makefile, did you bump Makefile up?" >&2
exit 1
fi
if [[ "$GIT_TAG" == "v$NIX_VER" ]]; then
echo "ERR: Nix module version matches git, did you bump Nix up?" >&2
exit 1
fi
if ! [[ "$NIX_VER" == "$MAKE_TAG" ]]; then
echo "ERR: Nix module version and make tag don't match" >&2
exit 1
fi
echo "VERSION=$MAKE_TAG" >> "$GITHUB_OUTPUT"