feat: Add CI/CD workflows for npm publishing #15
Merged
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.
π Production-Ready Release Automation
New GitHub Actions Workflows
1. npm-publish.yml (Release β npm)
Trigger: When GitHub Release is published
Steps:
Safety Features:
2. ci.yml (PR/Push Testing)
Trigger: PRs and pushes to main
Matrix: Node 18 and Node 20
Steps:
Ensures code quality before merging!
Documentation
NPM_PUBLISH_SETUP.md
Complete setup guide covering:
npm versionCHANGELOG.md
Initial changelog with:
Release Workflow (Recommended)
That's it! GitHub Action handles the rest:
Why This Approach?
β Industry Standard - Used by Zustand, SWR, React Hook Form, etc. β Simple - 3 commands, fully automated
β Safe - Multiple validation steps
β Intentional - Manual release creation prevents accidents β Auditable - GitHub Release notes + npm provenance β Flexible - Easy to evolve with future needs
Files Added
Ready for v2.0.0 release on December 21, 2025! π