Skip to content

Commit bd3c461

Browse files
pcarletonclaude
andcommitted
fix: use release-X.Y tag format to avoid semver range conflict
npm rejects tags like "v1.23" because they look like semver ranges. Use "release-1.23" format instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 0224934 commit bd3c461

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,14 @@ jobs:
7272
echo "tag=--tag beta" >> $GITHUB_OUTPUT
7373
# Check if this release is from a non-main branch (patch/maintenance release)
7474
elif [[ "${{ github.event.release.target_commitish }}" != "main" ]]; then
75-
# Use major.minor as tag for old branch releases (e.g., "v1.23" for 1.23.x)
75+
# Use "release-X.Y" as tag for old branch releases (e.g., "release-1.23" for 1.23.x)
7676
# npm tags are mutable pointers to versions (like "latest" pointing to 1.24.3).
77-
# Using "v1.23" means users can `npm install @modelcontextprotocol/sdk@v1.23`
77+
# Using "release-1.23" means users can `npm install @modelcontextprotocol/sdk@release-1.23`
7878
# to get the latest patch on that minor version, and the tag updates if we
7979
# release 1.23.2, 1.23.3, etc.
80+
# Note: Can't use "v1.23" because npm rejects tags that look like semver ranges.
8081
MAJOR_MINOR=$(echo "$VERSION" | cut -d. -f1,2)
81-
echo "tag=--tag v${MAJOR_MINOR}" >> $GITHUB_OUTPUT
82+
echo "tag=--tag release-${MAJOR_MINOR}" >> $GITHUB_OUTPUT
8283
else
8384
echo "tag=" >> $GITHUB_OUTPUT
8485
fi

0 commit comments

Comments
 (0)