image: node:latest

before_script:  
  - npm install

cache:  
  paths:
    - node_modules/

publish:  
  stage: deploy
  only:
    - master
  script:
    - npm run build
    - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}'>.npmrc
    - npm publish
