Repository navigation
ci: prerelease-aware release tooling (beta via @next, registry stays stable-only) - #112
Conversation
- set-version.sh / parity-check.sh accept X.Y.Z-prerelease (semver) versions - publish-npm.yml: expose is_prerelease from the version step; publish-registry job now skips prereleases — the official MCP Registry lists stable only, while npm prereleases publish under the 'next' dist-tag
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
There was a problem hiding this comment.
🟡 Not ready to approve
set-version.sh’s Perl substitution currently drops the closing quote in src/index.ts due to a capture-group mismatch, which can corrupt the file during version bumps.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR makes the release toolchain prerelease-aware (e.g. 2.0.0-beta.0) and prevents prerelease versions from being published to the official MCP Registry while still allowing npm prereleases under the next dist-tag.
Changes:
- Extend
set-version.shandparity-check.shto accept/extract prerelease semver strings. - Add
is_prereleasecomputation to the npm publish workflow and gate the registry publish job on stable-only versions. - Document prerelease behavior in the workflow (
publish-registryskip).
File summaries
| File | Description |
|---|---|
.github/workflows/publish-npm.yml |
Adds is_prerelease output and skips registry publishing for prerelease versions. |
.agents/skills/mcp-server-trello-release/scripts/set-version.sh |
Updates semver validation and attempts to make the src/index.ts version substitution prerelease-aware. |
.agents/skills/mcp-server-trello-release/scripts/parity-check.sh |
Updates version extraction to include optional prerelease components for parity checks. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
|
|
||
| # 4. src/index.ts McpServer info literal (anchored on the trello-server name). | ||
| perl -0pi -e "s/(name: 'trello-server',\s*\n\s*version: ')[0-9]+\.[0-9]+\.[0-9]+(')/\${1}$NEW\${2}/" src/index.ts | ||
| perl -0pi -e "s/(name: 'trello-server',\s*\n\s*version: ')[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(')/\${1}$NEW\${2}/" src/index.ts |
| echo "dist_tag=$(node scripts/npm-dist-tag.js "$package_version")" >> "$GITHUB_OUTPUT" | ||
| if node -e "process.exit(/^\d+\.\d+\.\d+-[0-9A-Za-z-]/.test('$package_version') ? 0 : 1)"; then | ||
| echo "is_prerelease=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "is_prerelease=false" >> "$GITHUB_OUTPUT" | ||
| fi |
The capturing group added in delorenj#112 shifted capture numbering: ${2} became the prerelease group instead of the closing quote, so the substitution ate the trailing quote in src/index.ts (TS1002 Unterminated string literal). Use a non-capturing group (?:...) so group 2 stays the quote. Verified end-to-end: stable→beta and beta→stable bumps leave the literal intact.
What
set-version.shandparity-check.shnow accept full semver including prereleases (2.0.0-beta.0). The perl substitution and parity extraction are prerelease-aware, so bumping FROM a beta TO a stable (or beta-to-beta) can't corrupt the literals.publish-npm.ymlcomputesis_prereleasein the version step (same rule asnpm-dist-tag.js) and thepublish-registryjob now skips prereleases.Why
Beta releases (e.g.
2.0.0-beta.0) already publish to npm under thenextdist-tag thanks tonpm-dist-tag.js—@latestnever moves. But the official MCP Registry listed every published version, including betas. After this PR, the registry only ever sees stable releases.Verified
set-version.sh 2.0.0-beta.0run end-to-end on a scratch repo: all five literals set, parity-check green.