-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
.travis.yml
96 lines (85 loc) · 2.81 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
os:
- linux
- osx
- windows
osx_image: xcode11.4
dist: bionic # linux
language: node_js
env:
global:
- YARN_GPG="no" # prevent windows vm hanging on completion
- CHANGELOG="$(git log --format='%h %s (@%an, %cr)' --tags --date-order $TRAVIS_COMMIT_RANGE)"
addons:
chrome: stable
apt:
update: true
git:
depth: 12 # quick clone, but less shallow for clicking rebuild a few merges later
quiet: true # save on logfiles
node_js:
- 10 # version
before_install:
# install 'rpm' on linux
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get -y install rpm; fi
# install 'nsis' on windows
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then choco install nsis; fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then export PATH="/c/Program Files (x86)/NSIS:$PATH"; fi
# install 'python' on all platforms supported
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get -y install python3 python3-pip; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PATH="$HOME/.local/bin:$PATH"; fi
# OSX use python 3.8, but fallback to 3.7 for j2
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export PATH="$HOME/Library/Python/3.8/bin:$HOME/Library/Python/3.7/bin:$PATH"; fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then choco install python --version 3.8.0; fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then export PATH="/c/Python38:/c/Python38/Scripts:/c/Users/travis/AppData/Roaming/Python/Python38/Scripts:$PATH"; fi
install:
- pip3 -q install --user --upgrade j2cli # install pip
script:
- echo "${CHANGELOG}" > CHANGELOG.md
- cat CHANGELOG.md
- ./.travis.sh # main
cache:
ccache: true
pip: true
yarn: true
directories:
- cache
- '/c/Users/travis/AppData/Local/Temp/chocolatey'
deploy:
- provider: releases
edge: true
token: "${GITHUB_TOKEN}"
name: "${TRAVIS_TAG}"
body: "${CHANGELOG}"
tag_name: "${TRAVIS_TAG}"
target_commitish: "${TRAVIS_COMMIT}"
file_glob: true
file:
- release/*
cleanup: false # do not delete what has just been built
draft: true
prerelease: true
overwrite: true
on:
tags: true
- provider: bintray
user: "${BINTRAY2_USER}"
key: "${BINTRAY2_API_KEY}"
file: bintray-conf.json
cleanup: false # do not delete what has just been built
skip_cleanup: true #travis report deprecated, but seems necessary anyway
on:
all_branches: true
after_deploy:
- >
if [ "$TRAVIS_OS_NAME" != "windows" ]; then
wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
chmod +x send.sh
./send.sh success $WEBHOOK_URL
fi
after_failure:
- >
if [ "$TRAVIS_OS_NAME" != "windows" ]; then
wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
chmod +x send.sh
./send.sh failure $WEBHOOK_URL
fi