-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.travis.yml
80 lines (73 loc) · 1.9 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
env:
global:
- SENTRY_RELEASE=$TRAVIS_TAG
matrix:
include:
- os: osx
osx_image: xcode10
language: node_js
node_js: lts/*
if: tag IS present
- os: windows
env: YARN_GPG=no
language: node_js
node_js: lts/*
if: tag IS present
- os: linux
dist: bionic
language: node_js
node_js: lts/*
services:
- xvfb
branches:
except:
- /^hotfix*$/
- /^feature*$/
- /^release*$/
cache: false
before_install:
- export TZ='Asia/Shanghai'
install:
- if [ $TRAVIS_OS_NAME = osx ]; then yarn install; fi
- if [ $TRAVIS_OS_NAME = linux ]; then yarn install; fi
- if [ $TRAVIS_OS_NAME = windows ]; then npm install; fi
script:
- yarn lint
- if [ $TRAVIS_OS_NAME = osx ]; then yarn test --watchAll false; fi
- if [ $TRAVIS_OS_NAME = linux ]; then xvfb-run -a yarn test --watchAll false; fi
- yarn build
after_success:
- if [ $TRAVIS_OS_NAME = linux ]; then xvfb-run -a yarn test:coverage --watchAll false; fi
- if [ $TRAVIS_OS_NAME = linux ]; then cat ./coverage/lcov.info | yarn coveralls; fi
before_deploy:
- ls ./build
- ls ./build/static/js
- yarn sentry-cli releases new $SENTRY_RELEASE
- yarn sentry-cli releases files $SENTRY_RELEASE upload-sourcemaps --url-prefix '~/build' --rewrite ./build
- yarn sentry-cli releases finalize $SENTRY_RELEASE
- find ./build -name "*.map" -exec rm -f {} \;
- yarn electron-pack --publish never
- ls ./dist
deploy:
- provider: releases
skip_cleanup: true
api_key: $GITHUB_REPO_TOKEN
name: Release $TRAVIS_TAG
draft: true
file_glob: true
file:
- ./dist/*.zip
- ./dist/*.dmg
- ./dist/*.AppImage
- ./dist/*.snap
- ./dist/*.yml
- ./dist/*.exe
on:
tags: true
- provider: snap
skip_cleanup: true
channel: edge
snap: ./dist/*.snap
on:
tags: true
condition: $TRAVIS_OS_NAME = linux