Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up automated NPM package publishing workflow #14

Open
28 tasks
r-near opened this issue Dec 20, 2024 · 0 comments
Open
28 tasks

Set up automated NPM package publishing workflow #14

r-near opened this issue Dec 20, 2024 · 0 comments

Comments

@r-near
Copy link
Collaborator

r-near commented Dec 20, 2024

Overview

Set up a comprehensive NPM package publishing workflow with versioning, changelogs, and automated releases.

Objectives

  • Set up build system with tsup
  • Implement changesets for version management and changelogs
  • Configure GitHub Actions for automated testing and deployment
  • Set up NPM package configuration and publishing workflow

Detailed Requirements

Build System (tsup)

  • Install and configure tsup for TypeScript build
  • Set up build configuration for multiple formats (ESM, CJS)
  • Configure TypeScript declaration file generation
  • Add build scripts to package.json
  • Set up build caching for faster development

Changesets

  • Install and initialize changesets
  • Set up changeset configuration
  • Create documentation for team on how to use changesets
  • Configure changeset bot for PR management
  • Set up automated changelog generation

Automated Publishing

  • Create GitHub Actions workflow for:
    • Automated testing on PRs
    • Build verification
    • Changeset version updates
    • NPM package publishing
  • Set up NPM authentication in GitHub Actions
  • Configure release triggers
  • Add status checks for required steps

Package Configuration

  • Update package.json with:
    • Correct entry points (ESM/CJS)
    • Types field
    • Exports map
    • Package metadata
    • Repository info
  • Set up .npmignore or files array
  • Configure package access and scope
  • Add README with installation and usage instructions

Additional Considerations

  • Set up semantic release configuration
  • Add release preview environment
  • Configure dependabot for dependency updates
  • Set up bundle size monitoring
  • Add package publishing documentation
  • Configure package tag management

Technical Notes

  • Use tsup for its zero-config TypeScript build system and built-in optimizations
  • Changesets will handle versioning and changelog generation automatically
  • Consider using npm workspaces if we plan to split into multiple packages
  • May want to consider adding bundle analysis tools

Resources

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

No branches or pull requests

1 participant