language: node_js node_js: - 'node' cache: npm branches: only: - master - next - gh-pages jobs: include: - stage: install script: npm install - stage: build script: npm run build - stage: coverage script: - npm run test-coverage - npm run coveralls - stage: validate-version before_script: - chmod +x scripts/validate-version.js script: - node scripts/validate-version.js - stage: deploy-github before_script: - chmod +x scripts/push.sh - chmod +x scripts/_version.txt script: - . ./scripts/push.sh - node scripts/update-git-tag.js deploy: provider: releases api_key: $ENV_GITHUB_TOKEN skip_cleanup: true on: tags: true - stage: deploy-npm install: - npm install script: - npm run build deploy: provider: npm email: $ENV_EMAIL branch: master api_key: $ENV_NPM_API_KEY - stage: deploy-docs before_script: - chmod +x scripts/prep-jsdocs.sh script: - . ./scripts/prep-jsdocs.sh stages: - name: validate-version if: (branch = master) - name: install if: (type = pull_request) - name: build if: (type = pull_request) - name: coverage if: (type = pull_request) - name: deploy-github if: (branch = master) AND (type = push) - name: deploy-npm if: (branch = master) AND (type = push) - name: deploy-docs if: (branch = gh-pages) AND (type = push)