mirror of https://github.com/Kylart/KawAnime.git
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
matrix:
|
|
include:
|
|
- os: osx
|
|
osx_image: xcode10.2
|
|
language: node_js
|
|
node_js: "12"
|
|
env:
|
|
- ELECTRON_CACHE=$HOME/.cache/electron
|
|
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|
|
- MATRIX_EVAL="brew install gcc && CC=gcc-7 && CXX=g++-7"
|
|
|
|
- os: linux
|
|
services: docker
|
|
language: generic
|
|
addons:
|
|
apt:
|
|
sources:
|
|
- ubuntu-toolchain-r-test
|
|
packages:
|
|
- g++-7
|
|
env:
|
|
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
|
|
|
|
cache:
|
|
directories:
|
|
- node_modules
|
|
- $HOME/.cache/electron
|
|
- $HOME/.cache/electron-builder
|
|
|
|
install:
|
|
- npm install
|
|
|
|
jobs:
|
|
include:
|
|
-
|
|
name: Lint
|
|
script:
|
|
- npm run lint
|
|
-
|
|
name: Deploy
|
|
if: branch = master
|
|
script:
|
|
- |
|
|
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
|
docker run --rm \
|
|
--env-file <(env | 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 \
|
|
/bin/bash -c "npm run publish:linux"
|
|
else
|
|
npm run publish:mac
|
|
fi |