language: node_js cache: directories: - node_modules notifications: email: false branches: except: - /^v\d+\.\d+\.\d+$/ stages: - name: test # require the event type to not be a semantic release tag. if: NOT tag =~ ^v\d+\.\d+\.\d+$ - name: release # require the branch name to be one of the environment branches. if: branch = master AND fork = false AND type IN (push, api) jobs: include: - stage: test node_js: - 'lts/dubnium' script: - yarn lint - yarn test-ci after_script: - yarn coveralls - stage: release if: branch = master node_js: 'lts/dubnium' before_install: - echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc provider: script skip_cleanup: true script: - npx semantic-release