Skip to content

Commit c8ef9d5

Browse files
committed
fix(ci): use "release-X.Y" npm tag format for version branches
Both "1.4" and "v1.4" are valid SemVer ranges rejected by npm. Use "release-1.4" format instead.
1 parent 93a2d97 commit c8ef9d5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
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 `v1.4`)
54+
(e.g., `v1.4.x` publishes with tag `release-1.4`)
5555

5656
## Notes
5757

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +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-
# Prefix with "v" to avoid SemVer range conflict (npm rejects bare "1.4")
65-
NPM_TAG="v${BASH_REMATCH[1]}"
64+
# Use "release-X.Y" format to avoid SemVer range conflict (npm rejects "1.4" and "v1.4")
65+
NPM_TAG="release-${BASH_REMATCH[1]}"
6666
else
6767
echo "The tagged commit is not on the main branch or a version branch (v*.*.x)."
6868
echo "::error ::Releases must be on the main branch or a version branch (v*.*.x)."

0 commit comments

Comments
 (0)