image: node:8
before_script:
  - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}'>.npmrc
  
stages:
  - test
  - publish
testing:
  stage: test
  script:
    - npm install
    - npm test
publishing:
  stage: publish
  only:
    - master
  script:
    - echo Running release
    - npm publish

