Skip to content

Commit 93a2d97

Browse files
committed
fix(ci): prefix version branch npm tag with "v" to avoid SemVer conflict
npm rejects bare "1.4" as a tag because it's a valid SemVer range. Use "v1.4" instead.
1 parent 41d6c31 commit 93a2d97

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.claude/rules/release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ For maintaining older versions (e.g., v1.3.x while v1.4.x is latest):
5151

5252
1. Create a version branch named `v1.3.x` (or `v1.4.x`, etc.)
5353
2. Tags pushed from this branch will receive the version as the npm tag
54-
(e.g., `v1.4.x` publishes with tag `1.4`)
54+
(e.g., `v1.4.x` publishes with tag `v1.4`)
5555

5656
## Notes
5757

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ jobs:
6161
NPM_TAG="latest"
6262
elif [[ "$CURRENT_BRANCH" =~ ^v([0-9]+\.[0-9]+)\.x$ ]]; then
6363
# For version branches like v1.3.x, v1.4.x, use the version as npm tag
64-
NPM_TAG="${BASH_REMATCH[1]}"
64+
# Prefix with "v" to avoid SemVer range conflict (npm rejects bare "1.4")
65+
NPM_TAG="v${BASH_REMATCH[1]}"
6566
else
6667
echo "The tagged commit is not on the main branch or a version branch (v*.*.x)."
6768
echo "::error ::Releases must be on the main branch or a version branch (v*.*.x)."

0 commit comments

Comments
 (0)