forked from joshuef/peruse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
78 lines (73 loc) · 2.38 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
sudo: required
dist: trusty
os:
- osx
- linux
env:
# - NODE_ENV=dev
- NODE_ENV=prod
language: node_js
node_js:
- 8
cache:
yarn: true
directories:
- node_modules
- app/node_modules
- "$HOME/.electron"
- "$HOME/.cache"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- icnsutils
- graphicsmagick
- xz-utils
- xorriso
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start &
- sleep 5
script:
- yarn run build
- yarn run test
- export {no_proxy,NO_PROXY}="127.0.0.1,localhost"
- sleep 15
# - yarn run test e2e;
# - if [[ "$NODE_ENV" != "prod" ]]; then yarn run test e2e;
# fi
- yarn run package
- yarn run post-pack
after_success:
- ls release
- export RELEASE="$(ls release)";
- echo "deploying ${RELEASE} to GitHub releases as tagged with ${TRAVIS_TAG}"
- cd release
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ditto -c -k --sequesterRsrc --keepParent ${RELEASE} ${RELEASE}.zip;
fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then zip -r -q ${RELEASE}.zip ${RELEASE};
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then zip -d *.zip *.DS_Store && zip -d *.zip __MACOSX/\*;
fi
- cd ..
- ls release
before_deploy:
- export RELEASE_ZIP="$(ls release/*.zip)";
- echo "deploying ${RELEASE_ZIP} to GitHub releases as tagged with ${TRAVIS_TAG}"
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sha256sum release/*.zip >> release/$RELEASE.txt; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then shasum -a 256 release/*.zip >> release/$RELEASE.txt; fi
- export SHA_256_SUM="$(ls release/*.txt)";
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: i7J0VE/UAxfpei1AjMNrCP440wQNh2iLGFMip8FPotFIPBqHxxJlxmz9FCkVim/3XgtdgdQbT5M29IqkIt1pwtLn4xwx5LXgVNGy5/yW7uvqR2pnowhu2/G9YdOEZti+ZPLFnWCjqgMjdvbg8CE4K6is/Qa613EeDP1PBvCf2e0lvathNX9LOKDZk0G8DpTgFKp7ndCYBH4JmPLVbyWn2D9w4nmzpaYI2sk4ma+O7yrkDaE9u+AKrLn/RtshjgBovBSfMFqlaYUipIhkukAPYynArOUOCEoGNsOxthMbyPYOlH0PqY4OWEt2pSqQOYDOq14zemeskmcoGJeKmpw2WWHdz5ZKGBex6HSq6RbxOaPot0PSfnZxis2q/P9CwlPoTBjtk16UI+Y/ZPreL2dC+PRz2+NCTqVcl2yUKs6Z8HeuCG6ntnUlcWxqURzW5kdfD/lWxJMEtyqi1MAfieLyNpZiBsF08uOJeHfjW/QwB9zL6nSzkUznUWpvKQmS19yEb2bmUyFogyQj8KRnBhJTq74HMgRAbCT/fPnvIGvq63bwjKekqF1fAViTe/z8WL5l2B5D1cFJWy+l6VUlW6O8DpFe04jmzWo3vFYWmqNok2MzesMXQHLe6yE/Mo5+wfbUr5BS87sjCAw4GXF9ThcbYk0MjLKzfOBFafTFQoiM/Rs=
file:
- "${RELEASE_ZIP}"
- "${SHA_256_SUM}"
draft: true
tag_name: $TRAVIS_TAG
on:
tags: true