@@ -153,6 +153,8 @@ jobs:
153153 with :
154154 tag_name : ${{ inputs.version }}
155155 draft : true
156+ # Semver prerelease (v0.9.1-rc.1): never the "latest" release on GitHub.
157+ prerelease : ${{ contains(inputs.version, '-') }}
156158 files : |
157159 *.tar.gz
158160 *.zip
@@ -303,7 +305,16 @@ jobs:
303305 working-directory : pkg/npm
304306 env :
305307 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
306- run : npm publish --access public --provenance
308+ RELEASE_VERSION : ${{ inputs.version }}
309+ # A prerelease must never become npm `latest` — plain `npm install`
310+ # would serve the RC to everyone. Publish prereleases under the
311+ # `next` dist-tag; testers opt in via `npm i codebase-memory-mcp@next`.
312+ run : |
313+ if [[ "$RELEASE_VERSION" == *-* ]]; then
314+ npm publish --access public --provenance --tag next
315+ else
316+ npm publish --access public --provenance
317+ fi
307318
308319 # ── PyPI ─────────────────────────────────────────────────
309320 - name : Setup Python
@@ -340,7 +351,9 @@ jobs:
340351 # not touch npm/PyPI, so retries are safe.
341352 publish-mcp-registry :
342353 needs : [publish-registries]
343- if : ${{ !cancelled() && !failure() && needs.publish-registries.result == 'success' }}
354+ # Skipped for prereleases: the MCP Registry has no channel concept, so an
355+ # RC would present itself as the current version to every registry consumer.
356+ if : ${{ !cancelled() && !failure() && needs.publish-registries.result == 'success' && !contains(inputs.version, '-') }}
344357 runs-on : ubuntu-latest
345358 permissions :
346359 id-token : write # GitHub OIDC auth to the MCP Registry
0 commit comments