forked from massif-press/compcon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (76 loc) · 2.54 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
language: node_js
node_js: "10"
cache:
yarn: true
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
install:
- yarn
env:
global:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
before_cache:
- rm -rf $HOME/.cache/electron-builder/wine
stages:
- name: test
- name: build
if: tag IS present AND tag =~ /^\d+.\d+.\d+[a-z]?-(beta|stable|test)$/
- name: deploy
if: tag IS present AND tag =~ /^\d+.\d+.\d+[a-z]?-(beta|stable|test)$/
jobs:
include:
- stage: test
name: "test"
os: linux
dist: xenial
script:
- yarn unit-test
- yarn int-test
- yarn dist-travis --linux --publish never
- cat build/latest-linux.yml
- stage: build
name: "mac"
os: osx
osx_image: xcode10.2
script:
- ./build_scripts/install_aws.sh
- mkdir -p ~/$TRAVIS_BUILD_NUMBER/mac
- yarn dist-travis --mac --publish never
- cat build/latest-mac.yml
- aws s3 cp build/compcon*mac.zip s3://$AWS_BUCKET/$TRAVIS_BUILD_NUMBER/mac/
- stage: build
name: "windows"
os: osx
osx_image: xcode10.2
script:
- ./build_scripts/install_aws.sh
- mkdir -p ~/$TRAVIS_BUILD_NUMBER/win
- yarn dist-travis --win --publish never
- aws s3 cp build/compcon*.exe s3://$AWS_BUCKET/$TRAVIS_BUILD_NUMBER/win/
- stage: build
name: "linux"
os: linux
dist: xenial
script:
- ./build_scripts/install_aws.sh
- mkdir -p ~/$TRAVIS_BUILD_NUMBER/linux
- yarn dist-travis --linux --publish never
- cat build/latest-linux.yml
- aws s3 cp build/compcon*.AppImage s3://$AWS_BUCKET/$TRAVIS_BUILD_NUMBER/linux/
- stage: deploy
name: "deploy"
script:
- ./build_scripts/install_aws.sh
- source ./build_scripts/set_deploy_vars.sh
- mkdir ~/$TRAVIS_BUILD_NUMBER
- aws s3 cp --recursive s3://$AWS_BUCKET/$TRAVIS_BUILD_NUMBER ./$TRAVIS_BUILD_NUMBER
- curl -L -o butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default
- unzip butler.zip
- chmod +x butler
- ./butler -V
- ./butler push ./${TRAVIS_BUILD_NUMBER}/mac ${MAC_ITCH_CHANNEL} --userversion ${TAG_BUILD_VERSION}
- ./butler push ./${TRAVIS_BUILD_NUMBER}/win ${WIN_ITCH_CHANNEL} --userversion ${TAG_BUILD_VERSION}
- ./butler push ./${TRAVIS_BUILD_NUMBER}/linux ${LINUX_ITCH_CHANNEL} --userversion ${TAG_BUILD_VERSION}