DEV Community

Cover image for NPM Deploy Bot: Automate your deploy process
Dani Tseiltin
Dani Tseiltin

Posted on

NPM Deploy Bot: Automate your deploy process

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>"
}
Enter fullscreen mode Exit fullscreen mode

GitHub Actions integration

You can integrate this package with a GitHub action workflow:

  1. Setup your git configuration
  2. Create an .npmrc file with the NPM auth token
  3. Add deploy script in your package.json like in the example above
  4. 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)