File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 44 workflow_dispatch :
55 push :
66 tags :
7- - v[0-9]+\.[0-9]+\.[0-9]+(-[A-Z])?
7+ - ' v* '
88
99concurrency :
1010 group : ${{ github.workflow }}-${{ github.ref }}
1616 runs-on : ubuntu-latest
1717 steps :
1818
19+ # VALIDATE TAGS
20+ - id : validate-semver
21+ name : Validate tag against semantic versioning
22+ if : startsWith(github.ref, 'refs/tags/')
23+ shell : bash
24+ run : |
25+ SEMVER_PATTERN="^refs/tags/v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$"
26+ if [[ ! $GITHUB_REF =~ $SEMVER_PATTERN ]]
27+ then
28+ echo "Tag $GITHUB_REF does not follow semantic versioning"
29+ exit 1
30+ fi
31+
1932# SETUP BUILD ENVIRONMENT
2033 - id : prepare-maven-build
2134 name : Prepare Maven build
You can’t perform that action at this time.
0 commit comments