Chart.js/.travis.yml
Simon Brunel e8a51d80c8 #3033 Deploy dist files and bower.json (tags)
Add a new Travis deploy task to push dist/*.js and bower.json files into tag sources:
- requires Travis GITHUB_AUTH_TOKEN and GITHUB_AUTH_EMAIL environment variables
- skipped if not built from the "release" branch
- release.sh must be executable (see comment)
- reads tag version from package.json
- fails if tag already exists
2016-08-28 18:21:12 +02:00

65 lines
1.7 KiB
YAML

language: node_js
node_js:
- "5.10"
before_install:
- "export CHROME_BIN=/usr/bin/google-chrome"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
before_script:
- npm install
script:
- gulp build
- gulp test
- gulp coverage
- gulp package
- gulp bower
- cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
notifications:
slack: chartjs:pcfCZR6ugg5TEcaLtmIfQYuA
sudo: required
dist: trusty
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
deploy:
# Creates a tag containing dist files and bower.json
# Requires GITHUB_AUTH_TOKEN and GITHUB_AUTH_EMAIL environment variables
# IMPORTANT: the script has to be set executable in the Git repository (error 127)
# https://github.com/travis-ci/travis-ci/issues/5538#issuecomment-225025939
- provider: script
script: ./scripts/release.sh
skip_cleanup: true
on:
branch: release
- provider: releases
api_key:
secure: E6JiZzA/Qy+UD1so/rVfqYnMhgU4m0cUsljxyrKIiYKlt/ZXo1XJabNkpEIYLvckrNx+g/4cmidNcuLfrnAZJtUg53qHLxyqMTXa9zAqmxxJ6aIpQpNK25FIEk9Xwm2XZdbI5rrm0ZciP5rcgg0X8/j5+RtnU3ZpTOCVkp0P73A=
file:
- "./dist/Chart.bundle.js"
- "./dist/Chart.bundle.min.js"
- "./dist/Chart.js"
- "./dist/Chart.min.js"
- "./dist/Chart.js.zip"
skip_cleanup: true
on:
tags: true
- provider: npm
email:
secure: f6jQXdqhoKtEZ3WBvnNM9PB2l9yg8SGmnUwQzeuLpW731opmv1ngPcMA+CotDAavIRs2BvAgVoLJOVGxMRXRSi5pgahfR0O2LetFoT/Px+q4MMqtn3zMgV/OuYL/fIyKXjyoYwSRfjuaIIGX7VTCOpqOEe29UQJAb7XcG9jhgIo=
api_key:
secure: O5lgPeX5ofkMSiUeijs+0hrK9Dejmpki/UABd+rgx3Cmjlxvi5DVugHpcn/6C0if0CoHv5/TqwQHVgL43kwR5ZKcspl7bzK2vD2YBpingF42Oz91YVNZwQIJyWNVSSWzzFYzG9xOXO26ZD1gTZ26Z3X+xfZVtugWkzbBa/c8NmQ=
skip_cleanup: true
on:
tags: true