Skip to content

ci: prerelease-aware release tooling (beta via @next, registry stays stable-only) - #112

Merged
delorenj merged 1 commit into
mainfrom
ci/prerelease-releases
Aug 4, 2026
Merged

delorenj merged 1 commit into
mainfrom
ci/prerelease-releases

Conversation

@delorenj

@delorenj delorenj commented Aug 4, 2026

Copy link
Copy Markdown
Owner

What

  • set-version.sh and parity-check.sh now 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.yml computes is_prerelease in the version step (same rule as npm-dist-tag.js) and the publish-registry job now skips prereleases.

Why

Beta releases (e.g. 2.0.0-beta.0) already publish to npm under the next dist-tag thanks to npm-dist-tag.js — @latest never 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.0 run end-to-end on a scratch repo: all five literals set, parity-check green.
  • Regex accept/reject table tested (accepts 1.8.1 / 2.0.0-beta / 2.0.0-rc.1; rejects 1.8 / x.y.z / 2.0.0-).
  • Workflow YAML parses.

- 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
Copilot AI lite review requested due to automatic review settings August 4, 2026 05:46
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@delorenj
delorenj merged commit 1d0a800 into main Aug 4, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.sh and parity-check.sh to accept/extract prerelease semver strings.
  • Add is_prerelease computation to the npm publish workflow and gate the registry publish job on stable-only versions.
  • Document prerelease behavior in the workflow (publish-registry skip).
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
Comment on lines 72 to +77
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
@delorenj
delorenj deleted the ci/prerelease-releases branch August 4, 2026 05:52
haitai pushed a commit to haitai/mcp-server-trello that referenced this pull request Aug 11, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants