VoTT/.travis.yml

54 строки
1.6 KiB
YAML

matrix:
include:
- os: osx
osx_image: xcode9.4
language: node_js
node_js: "10"
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- os: linux
services: docker
language: generic
cache:
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export DISPLAY=:99.0; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sh -e /etc/init.d/xvfb start; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sleep 3; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm install; fi
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run compile; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm test; fi
before_deploy:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
docker run --rm \
--env-file <(env | grep -vE '\r|\n' | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') \
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine \
/bin/bash -c "npm run dist:winlinux"
else
npm run dist:mac
fi
before_cache:
- rm -rf $HOME/.cache/electron-builder/wine
deploy:
- provider: releases
api_key: $GITHUB_TOKEN
file:
- "dist/vott-win.exe"
- "dist/vott-linux.snap"
- "dist/vott-mac.dmg"
skip_cleanup: true
on:
tags: true