Skip to content

Commit fcc688a

Browse files
phernandezclaude
andcommitted
fix: allow pre-release versions in release workflow
The semver regex now accepts suffixes like -alpha.3, -beta.1, -rc.1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0095808 commit fcc688a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ jobs:
5656
5757
if [[ "$VERSION_INPUT" =~ ^(patch|minor|major)$ ]]; then
5858
npm version "$VERSION_INPUT" -m "chore(release): %s"
59-
elif [[ "$VERSION_INPUT" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
59+
elif [[ "$VERSION_INPUT" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-.+)?$ ]]; then
6060
npm version "$VERSION_INPUT" -m "chore(release): %s"
6161
else
6262
echo "Unsupported version input: $VERSION_INPUT" >&2
63-
echo "Use patch|minor|major or explicit semver like 0.2.0" >&2
63+
echo "Use patch|minor|major or explicit semver like 0.2.0 or 0.2.0-alpha.1" >&2
6464
exit 1
6565
fi
6666

0 commit comments

Comments
 (0)