sudo: false language: node_js notifications: email: false install: - npm ci stages: - name: test # require the event type to not be a semantic release tag. if: NOT tag =~ ^v\d+\.\d+\.\d+$ - name: deploy # require the branch name to be one of the environment branches. if: branch IN (master) AND fork = false AND type IN (push, api) jobs: include: - stage: test node_js: '10' script: - npm run lint - npm run test-ci after_script: - npm run coveralls - stage: deploy if: branch = master # Semantic release will fail if it's not using node 8. node_js: '10' before_install: - echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc provider: script skip_cleanup: true script: - npx semantic-release