-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
54 lines (47 loc) · 1.18 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
language: node_js
node_js:
- '12.18.1'
# Always run two parallel builds: one on mac and one on linux
# the linux build will use wine to be able to build windows and
# linux apps
matrix:
include:
- os: linux
dist: trusty
sudo: required
services: docker
language: generic
notifications:
email: false
# cache some files for faster builds
cache:
yarn: true
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
# on PRs and merges to main build the app
script:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
docker run --rm \
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine \
/bin/bash -c "yarn --link-duplicates --pure-lockfile"
fi
# only deploy to github on a merge to the prod branch
deploy:
provider: script
script: bash deploy.travis.sh
skip_cleanup: true
on:
branch: main
before_cache:
- rm -rf $HOME/.cache/electron-builder/wine
# only run this script on pull requests and merges into
# the 'main' branch
branches:
only:
- main