File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,20 +31,18 @@ jobs:
3131
3232 - name : Fetch all tags
3333 run : |
34- git fetch --prune --unshallow || true
35- git fetch --tags --quiet
34+ git fetch --prune --unshallow || echo "Already unshallowed or failed, continuing"
35+ git fetch --tags --quiet || echo "Failed to fetch tags, continuing"
3636
37- - name : Ensure tag is newer than latest
37+ - name : Ensure tag is newer than latest (unless pre-release)
3838 run : |
3939 CURRENT="${{ steps.extract-tag.outputs.tag }}"
40- LATEST=$(git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)
40+ LATEST=$(git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+([ab][0-9]+)? $' | head -n 1)
4141
4242 echo "Current tag: $CURRENT"
4343 echo "Latest tag: $LATEST"
4444
45- if [ -n "$LATEST" ]; then
46- python3 -c "from packaging.version import parse; import sys; if parse('$CURRENT'[1:]) <= parse('$LATEST'[1:]): sys.exit('Tag ' + '$CURRENT' + ' is not newer than latest tag ' + '$LATEST')"
47- fi
45+ python .github/scripts/validate_tag.py "$CURRENT" "$LATEST"
4846
4947 build :
5048 needs : validate-tag
You can’t perform that action at this time.
0 commit comments