Joshua Amaju - NPM Publishing Checklist
← Back to writing

NPM Publishing Checklist

  • Create GitHub repository
  • Allow action read/write permission
  • Allow action to create and approve pull requests (PR)
  • Add GitHub workflow for running test on PRs
  • Add GitHub workflow for running release
  • Create temporary npm token for initial publishing (expire in 7 days)
  • Add NPM_TOKEN to GitHub repository secrets
  • Setup changeset for versioning and release management
    • Setup local project by running init command
    • Install changeset GitHub bot
    • Set access in config to public
    • Set baseBranch to repository base branch
    • Set package version to 0.0.0
    • Add version changeset version package script
  • Add LICENSE file
  • Add license field to package.json
  • Add detailed README
  • Add files to publish to package.json i.e dist, package.json, README etc
  • Add keywords for searchability
  • Add package author i.e Joshua Amaju joshsemail4work@gmail.com
  • Set publishConfig.access to public
  • Add respository field to package.json link to package repository
  • Add homepage field to package.json link to package website or repository
  • DELETE NPM_TOKEN after first publish
  • Setup trusted publishing