forked from bunqCommunity/bunqDesktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
119 lines (108 loc) · 4.69 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
matrix:
include:
- os: osx
osx_image: xcode9.4
language: node_js
node_js: '12'
env:
- HOMEBREW_NO_AUTO_UPDATE=1
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- os: linux
services: docker
language: generic
sudo: required
node_js: '12'
addons:
apt:
packages:
- ucommon-utils
cache:
directories:
- node_modules
- docker_images
- "$HOME/.cache/electron"
- "$HOME/.cache/electron-builder"
before_install:
- nvm install
- docker load -i docker_images/images.tar || true
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v2.3.1/git-lfs-$([ "$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-2.3.1.tar.gz | tar -xz -C /tmp/git-lfs --strip-components 1
export PATH="/tmp/git-lfs:$PATH"
fi
before_script:
- git lfs pull
script:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
bash ${TRAVIS_BUILD_DIR}/build/docker/electron-linux/run.sh
else
yarn run release -- --mac --win
fi
before_cache:
- rm -rf $HOME/.cache/electron-builder/wine
- docker save -o docker_images/images.tar $(docker images -a -q)
# On linux create a tar gz file
before_deploy:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo tar -cvzf ./dist/bunqDesktop-linux-unpacked.tar.gz ./dist/linux-unpacked/*
fi
- ls dist
# Create checksums for dist file
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
find dist/bunqDesktop-*.* -type f -maxdepth 1 -print0 | xargs -0 shasum -a 256 >> dist/CHECKSUMS_OSX.sha256
cat dist/CHECKSUMS_OSX.sha256
else
sha256sum dist/bunqDesktop-*.* >> dist/CHECKSUMS.sha256
cat dist/CHECKSUMS.sha256
fi
# install JQ for curl handling
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install jq; else brew install jq; fi
# install latest version of Go with snap
- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=master bash)"
# get the GHR go library
- go version
- export GOPATH="$HOME/go"
- export PATH="$PATH:$GOPATH/bin"
- go get -u github.com/tcnksm/ghr
deploy:
- provider: releases
overwrite: true
tag_name: travis_build
name: travis_build
draft: true
skip_cleanup: true
api_key:
secure: fuXvloxR1qV4Xj8PecoF8gmQHCPukRF3nR7+szuHsoumUusyko0N5QbItdIfYTwpV9pIGwujV5mB0Ya/CKQzILkdlXo+cJzpCvFGJ1Q9wKk9hwLnouOiyF3wsagia8dpX4iLzVEATu4+LM3jol+KlXLGl8OxkGIy5Vifbd5GTbEiSrTxT9cF48/0ubgf/9rjjJyo5exuE30pRLs+m9cqnCSwgwcH6368OfYOlbRSgtGtzR9eEoGlqiNk2UHGmZUwy8dqOhid+meM7IGXwPjua8hrp1/nc/k8+UcwQxxly8xjp8bib6ier+2GbfbwxHiPWUtKFHoNzJlGWfj6xahz6fPL412HGeWVCrbVJcI3bTb/Ed1EjsjQyr4rUwvFnGitzRQAYqg/s2tpl4mVFPYyLgVMnlqiGNMkAaGfqYgErwdCkaYTtWGmLdIUkDsPMCSc4hOlajWNlb2n/ArYHOCmD+KC1KJ8hsJTxXQWD9Tfv5JBKd8g+63YIS+YEifUsxa9W4UhtODsPwBBcot/m4EH1FJS7wsticqB7rbkVq2iiMLWWMOImX47FSBqFG/0ioeWFayLIuDz+Ulvska/Nz4+R0tCQc4t1l1FDT56WI54H4KE2oYIQ8Y3U304mS6URhVRN+561HwzxVJA4halN30H4aOQjhjm5LW1e4PcSRiRalo=
file_glob: true
file:
- dist/bunqDesktop-*.exe
- dist/bunqDesktop-*.dmg
- dist/bunqDesktop-*.deb
- dist/bunqDesktop-*.snap
- dist/bunqDesktop-*.AppImage
- dist/bunqDesktop-linux-unpacked.tar.gz
- dist/CHECKSUMS*.sha256
on:
all_branches: true
condition: $TRAVIS_BRANCH == 'release'
- provider: script
skip_cleanup: true
script: bash ./tasks/ghr-upload.sh
on:
all_branches: true
condition: $TRAVIS_BRANCH == 'snapshot-build' || $TRAVIS_EVENT_TYPE == 'cron'
- provider: script
script: docker run -v $(pwd):$(pwd) -w $(pwd) snapcore/snapcraft sh -c "apt update && snapcraft push dist/bunqDesktop-*.snap --release edge"
skip_cleanup: true
on:
branch: release
condition: $TRAVIS_OS_NAME == 'linux'
after_success:
- openssl aes-256-cbc -K $encrypted_68d7de2f7cf4_key -iv $encrypted_68d7de2f7cf4_iv -in .snapcraft/travis_snapcraft.cfg -out .snapcraft/snapcraft.cfg -d
env:
global:
secure: rYM1Is70EExcOD4B5GddlXVGGgrz3KWQneL+/9BqbBFoKc2gWL+mycrw+5FZLhE55JjKUpOZM/StRDwSgYKqUHc+bwOoF9nHeOih0BNTj18UxvdViN1owR3qrxSr/FYWF5aMt/xOFs9Cv24m0H67t/XPjEOryNrcplnTP7cyrmDQPHjNIvScm046tdiSHYQvtpP5QBdwH2lOnN4IZ6e2b/V1POJwyZzB4w4o6xkseLpV2BShULItwzhbIonTvj5R0jQ/5x4tZHeMh9GvP04Mb3QX6mcqCBghr3ZY/8g4LjBdYmUAFfUyV+MjGKQqEJtb1GBqS1ehZML6CMZ4OBKJp/+JGzDKamOX+WoegvfKanoWhQ1QGOT9/GETbopgx+mLN6a5AJmQKm4pW7KP6Z/sUg6QszN/MZPeIt8KB7myBJSAgGpen4O0My1WUEjRlkm8orMdEDdI8BFuUfbRMQkeeYqc8tu974KE6ormOU+g07/+eA9GRQehADOht5sbuXsW4TjKNbYVWW0iGPIwWps/kzj7vObaF52AtKJPMyaoIDuMPG8Q97jmuYNI+hPf+3P8e7bSXoWsnv2mfmIAhHp38uul9oFeYMzI1y+41O+ICjrxCd8Cks1GdHARSXcXQvWfVISPTsYB7afUo0GuLaAj04YBsiX06gGjhibdGiJmaM0=