From fcc8be77ee57f6739407957d4207a8c3ad3784e7 Mon Sep 17 00:00:00 2001 From: javalsai Date: Sun, 6 Jul 2025 23:14:04 +0200 Subject: [PATCH] dev(ci): add nix version check to pre-release ci checks --- .github/workflows/make-release.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/make-release.yml b/.github/workflows/make-release.yml index 4f936bf..6549a17 100644 --- a/.github/workflows/make-release.yml +++ b/.github/workflows/make-release.yml @@ -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"