-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Issue Type
- Feature Request
Description
Add a GitHub Actions workflow that automatically publishes the npm package to the registry when a PR is merged to the main
branch, and a new version is released via GitHub Release or tag.
Expected Behavior
- When a pull request is merged into
main
:- If the commit includes a version bump (e.g., via Changesets or
package.json
update) - And if a GitHub Release is created or a tag matching
v*.*.*
is pushed
- If the commit includes a version bump (e.g., via Changesets or
Then:
- A GitHub Actions workflow should:
- Run
pnpm build
- Run
pnpm publish
using an npm auth token - Update the changelog if using Changesets
- Confirm the package is available on npm
- Run
Requirements
- Supports monorepo structure (
turbo
,pnpm
, etc.) - Validates that the release/tag follows semver (
v1.2.3
) - Uses GitHub-provided
NODE_AUTH_TOKEN
secret - Fails gracefully with proper logging on publish errors
- Optional: updates or generates changelog from changesets
Additional Context
- This should support both public and internal packages
- Must not publish from non-
main
branches - Use conventional naming or changeset to trigger version bumps
Metadata
Metadata
Assignees
Labels
No labels