From 521fdff8f03725bfb190ca83409d806ce63f3028 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sat, 24 Feb 2024 01:33:20 +0100 Subject: [PATCH] Fail if tag version doesn't match mypy base version --- .github/workflows/build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32e18f3..274a27c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,12 +63,18 @@ jobs: if [[ "${{ github.event_name }}" == "push" ]]; then echo "github_ref: ${{ github.ref }}" tag_version=$(echo "${{ github.ref }}" | cut -d "/" -f3) + echo "tag_version: ${tag_version}" + mypy_base=$(echo "${{ steps.mypy-version.outputs.mypy_version }}" | cut -d "+" -f1) + echo "mypy_base: {mypy_base}" + if [[ "${tag_version}" != "${mypy_base}"* ]]; then + echo "Base tag_version does not match base mypy_version!" + exit 1 else echo "Pull request or workflow dispatch" echo "Set placeholder version" tag_version=1.0.0 + echo "tag_version: ${tag_version}" fi - echo "tag_version: ${tag_version}" echo "tag_version=${tag_version}" >> $GITHUB_OUTPUT build_wheels: