Choices/.travis.yml

44 lines
928 B
YAML

language: node_js
node_js:
- 10
cache:
directories:
- ~/.npm
- ~/.cache
install:
- npm ci
jobs:
include:
- stage: Judging bundle size
script: npm run bundlesize
- stage: Linting code
script: npm run lint
- stage: Running tests
script: npm run test
- stage: Building for publish
if: branch = master
script: npm run build && npm run bump-cache
- stage: Publishing to NPM
if: branch = master
script: echo "Publishing to NPM..."
deploy:
provider: npm
email: $NPM_EMAIL_ADDRESS
api_key: $NPM_API_KEY
skip_cleanup: true
on:
tags: true
- stage: Publishing to GitHub releases
if: branch = master
script: echo "Publishing to Github releases..."
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
skip_cleanup: true
on:
tags: true