image: node

stages:
  - build
  - publish

build:
  stage: build
  before_script:
    - npm install
  script:
    - npm run build:development

publish:
  stage: publish
  dependencies:
    - build
  only:
    - master
  before_script:
    - npm install
    - npm run build:production
  script:
    - npm publish -y
