Hi, I've made a NPM package that helps you release versions of your NPM package.
Why?
I had a project where I wanted to automate the NPM version releases on each commit to master in order to automate the process and make it a bit easier.
How do you use it?
You just run npm-deploy <package name>
and it releases the next version based on the latest version released to NPM.
You can also create a package.json script to deploy your version to make it easier to use:
"scripts": {
"deploy": "npm-deploy <package name>"
}
GitHub Actions integration
You can integrate this package with a GitHub action workflow:
- Setup your git configuration
- Create an .npmrc file with the NPM auth token
- Add deploy script in your package.json like in the example above
- Run npm run deploy A full example can be seen here
If you liked it, you can find this package here, feel free to point out your opinion and give it a good star ;)
Top comments (0)