Skip to content

Commit

Permalink
Fail if tag version doesn't match mypy base version
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed Feb 24, 2024
1 parent bf61a32 commit 521fdff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 521fdff

Please sign in to comment.