Skip to content

ci: restore the npm publish workflow (manual dispatch or GitHub Release) - #114

Merged
jasonrundell merged 1 commit into
mainfrom
ci/npm-publish
Sep 3, 2026
Merged

jasonrundell merged 1 commit into
mainfrom
ci/npm-publish

Conversation

@jasonrundell

Copy link
Copy Markdown
Owner

Why

The beta publish for #98 never reached the registry: npm view @jasonrundell/react-mega-menu still shows only latest: 2.2.2. The repo's release-triggered npm-publish.yml was deleted in #86, so a GitHub Release runs nothing today, and main has no other publish mechanism.

What

.github/workflows/npm-publish.yml, runnable two ways:

  • Actions tab → "Publish to npm" → Run workflow on main. The dist-tag is derived from package.json's version: a pre-release (3.0.0-beta.0) goes to beta, anything else to latest; an input can override it. It refuses to put a pre-release under latest.
  • Publishing a GitHub Release, same derivation.

The job runs npm ci and the full npm test (which builds first), publishes with NODE_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.md now 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

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
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
react-mega-menu Ready Ready Preview Sep 3, 2026 8:42pm UTC

@jasonrundell
jasonrundell merged commit 0591d91 into main Sep 3, 2026
4 checks passed
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