image: node:latest

stages:
  - build
  - package

build:
  stage: build
  script:
    - npm install
    - npm run build
  artifacts:
    paths:
      - dist/

package:
  stage: package
  script:
    - tar -czvf dist.tar.gz dist/
  artifacts:
    paths:
      - dist.tar.gz