language: node_js
node_js:
  - "8"

env:
  global:
    - NPM_TAG=$(node ./build/parse-npm-tag.js)

script:
  - yarn
  - npm run lint
  - npm run test
  - npm run build

cache:
  yarn: true

before_deploy:
  - mkdir -p release
  - for file in ./dist/*; do cp "$file" "${file/dist\/vuetify/release\/vuetify-${TRAVIS_TAG}}"; done

deploy:
  - provider: npm
    email: "john.j.leider@gmail.com"
    api_key: $NPM_API_KEY
    tag: $NPM_TAG
    skip_cleanup: true
    on:
      repo: vuetifyjs/vuetify
      tags: true
  - provider: releases
    api_key: $GITHUB_API_KEY
    file: release/*
    skip_cleanup: true
    on:
      tags: true

language: node_js
node_js:
  - "8"

script:
  - yarn
  - npm run lint
  - npm run test
  - npm run build

cache:
  yarn: true

before_deploy:
  - export NPM_TAG=$(node ./build/parse-npm-tag.js)
  - mkdir -p release
  - for file in ./dist/*; do cp "$file" "${file/dist\/vuetify/release\/vuetify-${TRAVIS_TAG}}"; done

deploy:
  - provider: npm
    email: "john.j.leider@gmail.com"
    api_key: $NPM_API_KEY
    tag: $NPM_TAG
    skip_cleanup: true
    on:
      repo: vuetifyjs/vuetify
      tags: true
  - provider: releases
    api_key: $GITHUB_API_KEY
    file: release/*
    skip_cleanup: true
    on:
      tags: true

Define NPM_TAG after yarn packages have installed
chore: Define NPM_TAG after yarn packages have installed
