image: node:latest

stages:
  - test
  - deploy

test:
  stage: test
  script:
    - npm install
    - npm test

deploy-npm:
  stage: deploy
  script:
    - npm install
    - npm publish
  only:
    - master
  when: manual

image: node:latest

stages:
  - test
  - deploy

test:
  stage: test
  script:
    - npm install
    - npm test

deploy-npm:
  stage: deploy
  script:
    - npm install
    - npm publish
  only:
    - /^release-.*$/
  when: manual

Enable deployment only on release branches
Enable deployment only on release branches
