Skip to content

Commit

Permalink
ci(pre-release): update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
eythaann committed Oct 14, 2024
1 parent 1c9b4a4 commit 7cf3550
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
VERSION: ${{ github.event.inputs.version }}
# regex obtained from https://semver.org
run: |
SEMVER_REGEX="^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$"
if [[ ! "$VERSION" =~ $SEMVER_REGEX ]]; then
if [[ ! "$VERSION" =~ ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ ]]; then
echo "Error: The version '${VERSION}' is not a valid SemVer format (MAJOR.MINOR.PATCH)."
exit 1
fi
Expand Down

0 comments on commit 7cf3550

Please sign in to comment.