ci: restore the npm publish workflow (manual dispatch or GitHub Release) - #114
Merged
Merged
Conversation
The release-triggered npm-publish.yml was removed in #86, so creating a GitHub Release no longer publishes anything. This brings it back with a workflow_dispatch trigger as well, runs the full test suite first, derives the dist-tag from the version (pre-releases go to "beta", never "latest"), publishes with the `npm_token` secret, and verifies the version is visible on the registry afterwards. The release checklist points at it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NynwxzG7ZKWBaHW4QAmcp
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The beta publish for #98 never reached the registry:
npm view @jasonrundell/react-mega-menustill shows onlylatest: 2.2.2. The repo's release-triggerednpm-publish.ymlwas deleted in #86, so a GitHub Release runs nothing today, andmainhas no other publish mechanism.What
.github/workflows/npm-publish.yml, runnable two ways:main. The dist-tag is derived frompackage.json's version: a pre-release (3.0.0-beta.0) goes tobeta, anything else tolatest; an input can override it. It refuses to put a pre-release underlatest.The job runs
npm ciand the fullnpm test(which builds first), publishes withNODE_AUTH_TOKEN: ${{ secrets.npm_token }}(the secret name the original workflow used), then polls the registry until the version is visible.docs/release/v3.0.0.mdnow points at the workflow for both the beta and the 3.0.0 steps.Refs #98
🤖 Generated with Claude Code
https://claude.ai/code/session_017NynwxzG7ZKWBaHW4QAmcp
Generated by Claude Code