Skip to content

Commit c7fae0c

Browse files
SPerekrestovaclaude
andcommitted
ci: auto-align package version with git tag before publish
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 56d4a84 commit c7fae0c

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ jobs:
1919
with:
2020
node-version: "24"
2121
registry-url: "https://registry.npmjs.org"
22+
- name: Set version from tag
23+
run: |
24+
VERSION=${GITHUB_REF#refs/tags/v}
25+
npm version "$VERSION" --no-git-tag-version
26+
npm run sync-version
27+
2228
- run: npm ci
2329
- run: npm run build --if-present
2430
- run: npm test
@@ -33,10 +39,5 @@ jobs:
3339
- name: Authenticate to MCP Registry
3440
run: ./mcp-publisher login github-oidc
3541

36-
- name: Set version in server.json
37-
run: |
38-
VERSION=${GITHUB_REF#refs/tags/v}
39-
jq --arg v "$VERSION" '.version = $v' server.json > server.tmp && mv server.tmp server.json
40-
4142
- name: Publish server to MCP Registry
4243
run: ./mcp-publisher publish

0 commit comments

Comments
 (0)