language: node_js
node_js:
  - 8.10.0

cache:
  directories:
  - node_modules

before_install:
  - npm -g install yarn@^1.7.0
  - yarn add --dev codecov.io

script:
  - yarn test

after_success:
  - cat ./coverage/lcov.info | ./node_modules/codecov.io/bin/codecov.io.js
  - yarn build

deploy:
  - provider: pages
    skip_cleanup: true
    github_token: $GITHUB_TOKEN
    local_dir: demo/dist
    on:
      branch: master
      condition: $TRAVIS_PULL_REQUEST = false

  - provider: npm
    skip_cleanup: true
    email: $NPM_EMAIL
    api_key: $NPM_TOKEN
    on:
      branch: master
      condition: $TRAVIS_PULL_REQUEST = false

branches:
  only:
    - master

notifications:
  email:
    - raphael.morineau@gmail.com
    - maximilian.pichler97@gmail.com
    - huber.tarik@gmail.com
# Sources :
# https://tailordev.fr/blog/2018/03/15/automated-npm-releases-with-travis-ci/

language: node_js

node_js: lts

cache: yarn

before_install:
  - yarn add --dev codecov.io

install: yarn

script:
  - yarn test

after_success:
  - cat ./coverage/lcov.info | ./node_modules/codecov.io/bin/codecov.io.js
  - yarn build

deploy:
  # Github Releases: deploys the tagged version
  - provider: releases
    api_key: $GITHUB_TOKEN
    skip_cleanup: true
    on:
      tags: true

  # Github pages: deploys the demos site
  - provider: pages
    skip_cleanup: true
    github_token: $GITHUB_TOKEN
    local_dir: demo/dist
    on:
      branch: master
      condition: $TRAVIS_PULL_REQUEST = false

  # Deploys to https://www.npmjs.com/package/material-ui-superselectfield
  - provider: npm
    skip_cleanup: true
    email: $NPM_EMAIL
    api_key: $NPM_TOKEN
    on:
      branch: master
      condition: $TRAVIS_PULL_REQUEST = false

branches:
  only:
    - master

notifications:
  email:
    - raphael.morineau@gmail.com
    - maximilian.pichler97@gmail.com
    - huber.tarik@gmail.com

Raise NodeJS version to LTS, Add deploy stage for Github Releases
[Travis] Raise NodeJS version to LTS, Add deploy stage for Github
Releases
