--- kind: pipeline type: docker steps: - name: install image: node:14 commands: - npm ci --unsafe-perm - name: build image: node:14 depends_on: - install commands: - npm run build - name: test image: node:14 depends_on: - build commands: - npm test - name: publish image: node:14 environment: NPM_TOKEN: from_secret: npm_public_publish_token depends_on: - test when: branch: - master commands: - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc - NPM_CONFIG_REGISTRY="https://registry.npmjs.org/" npm run autopublish