stages: - publish publish_to_npm: stage: publish tags: [build] script: # see https://remysharp.com/2015/10/26/using-travis-with-private-npm-deps - echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc - npm publish only: - /^v.*$/