forked from yakyak/yakyak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
82 lines (79 loc) · 2.97 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
language: node_js
node_js:
- "6"
notifications:
email: false
#
# precise does not have wine1.6-i386
# it would be necessary to add wine ppa
#
# https://docs.travis-ci.com/user/trusty-ci-environment/#Using-Trusty
dist: xenial
sudo: required
before_deploy:
# YAKYAK_VERSION is used in the files to copy
- export YAKYAK_VERSION=`node -e "console.log(require('./package.json').version);"`
# debug information for the electron packager
- export DEBUG=electron-packager
# allows to have wine with 32-bits
- sudo dpkg --add-architecture i386
- sudo apt-get -qq update
- sudo apt-get install -y -qq wine1.6-i386 zip xvfb rpm
- WINEARCH=win32 wine wineboot --init
#
# actuall building of the binaries
- npm run -loglevel ${NPM_DEBUG_LEVEL} deploy:linux-x64
- npm run -loglevel ${NPM_DEBUG_LEVEL} deploy:linux-ia32
- npm run -loglevel ${NPM_DEBUG_LEVEL} deploy:darwin
- xvfb-run npm run -loglevel ${NPM_DEBUG_LEVEL} deploy:win32
#
# RPM and DEB binaries
# install fpm
- gem install --no-ri --no-rdoc fpm
#
- npm run -loglevel ${NPM_DEBUG_LEVEL} gulp deploy:linux-x64:rpm:nodep
- npm run -loglevel ${NPM_DEBUG_LEVEL} gulp deploy:linux-x64:deb:nodep
- npm run -loglevel ${NPM_DEBUG_LEVEL} gulp deploy:linux-ia32:rpm:nodep
- npm run -loglevel ${NPM_DEBUG_LEVEL} gulp deploy:linux-ia32:deb:nodep
#
# Flatpak
# install flatpak dependencies
- sudo add-apt-repository ppa:alexlarsson/flatpak -y
- sudo apt-get update -qq
- sudo apt-get install flatpak-builder flatpak -qq
- flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# 64-bits
- flatpak --user install flathub org.freedesktop.Sdk/x86_64/1.6
- flatpak --user install flathub org.freedesktop.Platform/x86_64/1.6
# 32-bits
- flatpak --user install flathub org.freedesktop.Sdk/i386/1.6
- flatpak --user install flathub org.freedesktop.Platform/i386/1.6
#
- npm run -loglevel ${NPM_DEBUG_LEVEL} gulp deploy:linux-x64:flatpak:nodep
- npm run -loglevel ${NPM_DEBUG_LEVEL} gulp deploy:linux-ia32:flatpak:nodep
deploy:
provider: releases
# overwrite pre-existing files
overwrite: true
# always create a pre-release
prerelease: true
# necessary to deploy in github, otherwise it would clean everything
skip_cleanup: true
# secret API_KEY stored in Travis CI
api_key: "${API_KEY}"
# files to copy to github release
file:
- "dist/yakyak-${YAKYAK_VERSION}-linux-x64.tar.gz"
- "dist/yakyak-${YAKYAK_VERSION}-linux-ia32.tar.gz"
- "dist/yakyak-${YAKYAK_VERSION}-win32-ia32.zip"
- "dist/yakyak-${YAKYAK_VERSION}-win32-x64.zip"
- "dist/yakyak-${YAKYAK_VERSION}-osx.zip"
- "dist/com.github.yakyak.YakYak_master_x64.flatpak"
- "dist/com.github.yakyak.YakYak_master_ia32.flatpak"
- "dist/yakyak-${YAKYAK_VERSION}-linux-amd64.deb"
- "dist/yakyak-${YAKYAK_VERSION}-linux-i386.deb"
- "dist/yakyak-${YAKYAK_VERSION}-linux-i386.rpm"
- "dist/yakyak-${YAKYAK_VERSION}-linux-x86_64.rpm"
# only trigger on tags
on:
tags: true