language: node_js
cache:
  directories:
    - ~/.npm
notifications:
  email: false
jobs:
  include:
    - script: npm run lint
    - script: npm run test
    - stage: semantic release
      script: npm run semantic-release
stages:
  - name: test
  - name: semantic release
    if: branch = master
branches:
  except:
    # ignore version tag branches from semantic release
    - /^v\d+\.\d+\.\d+$/

language: node_js
cache:
  directories:
    - ~/.npm
notifications:
  email: false
jobs:
  include:
    - script: npm run lint
    - script: npm run test
    - stage: semantic release
      script: npm run semantic-release
stages:
  - name: test
  - name: semantic release
    if: branch = master AND type = push
branches:
  except:
    # ignore version tag branches from semantic release
    - /^v\d+\.\d+\.\d+$/

Exclude release stage when not pushing to master.
ci(semantic-release): Exclude release stage when not pushing to master.
