pipeline: build: image: node:8 commands: - npm install - npm test publish: image: node:8 secrets: [npm_token] commands: - npm install - npm test - npm run build - npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN - npm publish when: event: tag branch: master