New to Bitbucket Cloud? Check out our get started guides for new users.
Deploy to npm
You can use Bitbucket Pipelines to build, test and publish your npm package.
You can use the feature of pushing back to your repository from within your pipeline to update the tag.
Be sure to include [skip ci] in the commit message of your version bump to avoid an infinite loop of builds!
Use the npm publish pipe to publish the package to the npm registry. To publish to a private npm package, edit your package.json to add a section like the example below.
There are even more examples in the pipe repository of how to use the pipe with npm.
For this example, we need to add the $NPM_TOKEN variable in Bitbucket.
Was this helpful?