Add semantic version validation to MCP server release
Validate tag follows X.Y.Z format before processing. Rejects malformed tags like mcp-v1.0 or mcp-v1.0.0.0. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
3e4764033f
commit
3b2fecb03c
1 changed files with 6 additions and 0 deletions
6
.github/workflows/release-mcp-server.yml
vendored
6
.github/workflows/release-mcp-server.yml
vendored
|
|
@ -29,6 +29,12 @@ jobs:
|
|||
id: version
|
||||
run: |
|
||||
TAG_VERSION=${GITHUB_REF#refs/tags/mcp-v}
|
||||
|
||||
if ! [[ $TAG_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo "Tag must follow semantic versioning: mcp-vX.Y.Z"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PROJECT_VERSION=$(python -c "import tomllib; print(tomllib.load(open('mcp_server/pyproject.toml', 'rb'))['project']['version'])")
|
||||
|
||||
if [ "$TAG_VERSION" != "$PROJECT_VERSION" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue