Skip to content

Instantly share code, notes, and snippets.

@guilouro
Created May 15, 2017 16:55
Show Gist options
  • Save guilouro/6554063978592cad2b423f8f3b1a660e to your computer and use it in GitHub Desktop.
Save guilouro/6554063978592cad2b423f8f3b1a660e to your computer and use it in GitHub Desktop.
publish npm with bitbucket pipeline
image: node:7
pipelines:
default:
- step:
script:
- printf "//`node -p \"require('url').parse(process.env.NPM_REGISTRY_URL || 'https://registry.npmjs.org').host\"`/:_authToken=${NPM_TOKEN}\nregistry=${NPM_REGISTRY_URL:-https://registry.npmjs.org}\n" >> ~/.npmrc
- npm publish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment