This guide explains how to publish the @programinglive/commiter package to npm.
- NPM Account: Create an account at npmjs.com
- Login to NPM: Run
npm loginin your terminal - Organization Access: Ensure you have access to the
@programingliveorganization on npm
npm loginEnter your npm credentials when prompted.
Check that package.json is correctly configured:
npm pack --dry-runThis shows what files will be included in the package.
For the first publish:
npm publish --access publicNote: The --access public flag is required for scoped packages (@programinglive/commiter) to be publicly accessible.
Check your package on npm:
https://www.npmjs.com/package/@programinglive/commiter
After the initial publish, use the built-in release commands:
npm run release:patch
git push --follow-tags origin main
npm publishnpm run release:minor
git push --follow-tags origin main
npm publishnpm run release:major
git push --follow-tags origin main
npm publish- Make changes and commit using conventional commits
- Run the appropriate release command
- Push to GitHub with tags
- Publish to npm
Example:
# Make changes
git add .
git commit -m "feat(cli): add interactive setup wizard"
# Create release
npm run release:minor
# Push to GitHub
git push --follow-tags origin main
# Publish to npm
npm publish- Make changes and commit using conventional commits
- Run the appropriate release command
- Push to GitHub with tags - npm publishing happens automatically
Example:
# Make changes
git add .
git commit -m "feat(cli): add interactive setup wizard"
# Create release
npm run release:minor
# Push to GitHub (triggers automatic npm publish)
git push --follow-tags origin mainSetup Required for Automated Publishing:
- Add
NPM_TOKENsecret to your GitHub repository - The GitHub Actions workflow (
.github/workflows/publish.yml) will automatically:- Run tests
- Publish to npm when a tag starting with
vis pushed - Use the
--access publicflag for scoped packages
If you need to unpublish a version within 72 hours:
npm unpublish @programinglive/commiter@1.0.0Warning: Unpublishing is permanent and should only be used in emergencies.
- Public: Anyone can install and use the package
- Open Source: MIT licensed - users can modify and distribute
- Free: No cost to install or use
For issues or questions:
- GitHub Issues: https://github.com/programinglive/commiter/issues
- NPM Package: https://www.npmjs.com/package/@programinglive/commiter