Skip to content

Commit d56f942

Browse files
committed
fix: correct version format validation regex in release workflow
- Fix bash regex pattern to properly validate semantic versions - Support X.Y.Z, X.Y.Z-prerelease, and X.Y.Z+build formats - Resolve version validation failure for 0.2.1
1 parent c7461fd commit d56f942

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- name: Validate version format
6262
run: |
6363
VERSION=${{ steps.get-version.outputs.version }}
64-
if [[ ! $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+([a-zA-Z0-9\-\.]+)?$ ]]; then
64+
if [[ ! $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9\.\-]+)?(\+[a-zA-Z0-9\.\-]+)?$ ]]; then
6565
echo "❌ Invalid version format: $VERSION"
6666
echo "Expected format: X.Y.Z or X.Y.Z-suffix"
6767
exit 1

0 commit comments

Comments
 (0)