chore: unify npm publish workflow#1881
Conversation
Add publish-next (auto-prerelease on push to main) and publish-latest (manual stable release with Discord notification). Update CONTRIBUTING.md to describe the trunk-based CD model.
Reject workflow_dispatch runs from non-main refs to prevent publishing unintended code or fast-forwarding main unexpectedly.
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughIntroduces a new GitHub Actions workflow for automated npm publishing that triggers on pushes to main (for changes in src, tools/cli, and package.json) and supports manual version bumping via workflow dispatch. Implements prerelease publishing to npm under the "next" tag on pushes and stable release publishing to the "latest" tag on manual dispatch, with version management, git tagging, GitHub releases, and Discord notifications. Updates CONTRIBUTING.md to document this publishing behavior. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
Consolidate npm publishing into a single GitHub Actions workflow.
Why
npm trusted publishing must point at one exact workflow file, so separate next/latest workflows cannot both be trusted publishers.
How