forked from Notifiarr/notifiarr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
171 lines (171 loc) · 8.2 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# Powered by Application Builder: https://github.com/golift/application-builder
env:
- MAKEBUILD=deb
jobs:
include:
- os: osx
if: tag IS present
osx_image: xcode13.2
language: go
go: 1.19.x
- if: tag IS NOT present AND branch != unstable
os: linux
dist: bionic
services: docker
language: go
go: 1.19.x
- if: tag IS present OR branch = unstable
os: linux
dist: bionic
services: docker
language: go
go: 1.19.x
env: MAKEBUILD=release
git:
depth: false
addons:
homebrew:
packages:
- upx
apt:
packages:
- ruby-dev
- rpm
- build-essential
- git
- libgnome-keyring-dev
- fakeroot
- zip
- debsigs
- gnupg
- upx
install:
- mkdir -p $(go env GOPATH)/bin
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.48.0
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then rvm install 2.6.0; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then rvm 2.6.0 do gem install --no-document fpm -v 1.11.0; fi
- make generate
before_script:
# Create your own deploy key, tar it, and encrypt the file to make this work. Optionally add a bitly_token file to the archive.
- openssl aes-256-cbc -K $encrypted_772fc4772f04_key -iv $encrypted_772fc4772f04_iv -in .secret_files.tar.enc -out .secret_files.tar -d
- tar -xf .secret_files.tar
- gpg --import gpg.signing.key
- rm -f gpg.signing.key .secret_files.tar
- source settings.sh
script:
# Test Go.
- make test
# Test Docker. Docker rate limits and breaks my builds.
- #if [ "$TRAVIS_OS_NAME" == "linux" ]; then make docker; fi
# Test built docker image.
- #if [ "$TRAVIS_OS_NAME" == "linux" ]; then docker run $BINARY -v 2>&1 | grep -Eq "^$BINARY,? v.*$VERSION"; fi
# Build everything
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then rvm 2.6.0 do make $MAKEBUILD; fi
# Build mac binary or image.
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then make dmg; fi
# Test homebrew (with make install).
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then make install VERSION=$VERSION ITERATION=$ITERATION PREFIX=/tmp/ab-$VERSION ETC=/tmp/ab-$VERSION/etc; fi
after_success:
# Display Release Folder
- ls -l release/
# Setup the ssh client so we can clone and push to the homebrew formula repo.
# You must put github_deploy_file into .secret_files.tar.enc
# This is an ssh key added to your homebrew forumla repo.
- |
mkdir -p $HOME/.ssh
declare -r HB_FILE="$(mktemp -u $HOME/.ssh/XXXXX)"
[ ! -f github_deploy_key ] || (mv github_deploy_key "${HB_FILE}" \
&& chmod 600 "$HB_FILE" \
&& printf "%s\n" \
"Host github.com" \
" HostName github.com" \
" IdentityFile ${HB_FILE}" \
" StrictHostKeyChecking no" \
" LogLevel ERROR" >> $HOME/.ssh/config)
declare -r AU_FILE="$(mktemp -u $HOME/.ssh/XXXXX)"
[ ! -f aur_deploy_key ] || (mv aur_deploy_key "${AU_FILE}" \
&& chmod 600 "${AU_FILE}" \
&& printf "%s\n" \
"Host github.com-aurepo" \
" HostName github.com" \
" IdentityFile ${AU_FILE}" \
" StrictHostKeyChecking no" \
" LogLevel ERROR" >> $HOME/.ssh/config)
deploy:
# Unstable (master pushes).
- provider: packagecloud
repository: unstable
username: golift
token:
secure: PuwkeI7VlBBEpg9b6KsQy4lDEt10dQuDsZ1qVQBEllqUmpfRbn2EGk8b7nTiRTjfCVT9u1FX4I43MN/IBdgJPg9fI3YQcg5/lbEUrqDLtgo/MsP8pvMnXuhU+JuROdOHJP7/mVJrOOjDJBykTkHgtHhUcd7DcgNL5wytVdxU9szbeSns1MDK6ZPN2zxGYj9H7hmGGPWXSyNFwl87fL9629KEXUh7Ad85/G/EACdv1USz3ZHjOVt7KaUuaK/tnlyygH1WH5ynV5CRuVgcIivGPjsLqbPYGv1OUbg2bq6JcLBgXivmiN+CI6C0LjlZEgYxaEw0ynyCbBTGkRRWSez5LiMsGHfPQynrw7MA6ZCkzfdVHCPT4HSdTCTc6g4kLvf7q2HRVeED07e8RFaNWrxJyOCE05L5PhKHpTilkJjrFVV19hluM95L1xnNEGWRpkJxjrFqwf7l2Y425+pTYwa2wrLdtULkGyLA2Wf7EHqGY2f9LZ3g32In1/do34MCDO/STUBpwIR+PqvATmqbVM8/otq1wmJD5yGmb0U9dp1CPZ3jdKjzlVJ8x7FLVwXhIKZJIh7RdOm7zsfmWvRvQkx0MyFtA4eoekYig+AmJEA+fCCqBQgdB1FHKRoElDUCRw3nyhhYamt6rDdqPxVPVHi87iRdg+OcUEtPNFrUxZDaJHU=
dist: ubuntu/focal
local-dir: release
package_glob: "*.deb"
skip_cleanup: true
cleanup: false
on:
branch: unstable
condition: "$TRAVIS_OS_NAME = linux"
- provider: packagecloud
repository: unstable
username: golift
token:
secure: PuwkeI7VlBBEpg9b6KsQy4lDEt10dQuDsZ1qVQBEllqUmpfRbn2EGk8b7nTiRTjfCVT9u1FX4I43MN/IBdgJPg9fI3YQcg5/lbEUrqDLtgo/MsP8pvMnXuhU+JuROdOHJP7/mVJrOOjDJBykTkHgtHhUcd7DcgNL5wytVdxU9szbeSns1MDK6ZPN2zxGYj9H7hmGGPWXSyNFwl87fL9629KEXUh7Ad85/G/EACdv1USz3ZHjOVt7KaUuaK/tnlyygH1WH5ynV5CRuVgcIivGPjsLqbPYGv1OUbg2bq6JcLBgXivmiN+CI6C0LjlZEgYxaEw0ynyCbBTGkRRWSez5LiMsGHfPQynrw7MA6ZCkzfdVHCPT4HSdTCTc6g4kLvf7q2HRVeED07e8RFaNWrxJyOCE05L5PhKHpTilkJjrFVV19hluM95L1xnNEGWRpkJxjrFqwf7l2Y425+pTYwa2wrLdtULkGyLA2Wf7EHqGY2f9LZ3g32In1/do34MCDO/STUBpwIR+PqvATmqbVM8/otq1wmJD5yGmb0U9dp1CPZ3jdKjzlVJ8x7FLVwXhIKZJIh7RdOm7zsfmWvRvQkx0MyFtA4eoekYig+AmJEA+fCCqBQgdB1FHKRoElDUCRw3nyhhYamt6rDdqPxVPVHi87iRdg+OcUEtPNFrUxZDaJHU=
dist: el/6
local-dir: release
package_glob: "*.rpm"
skip_cleanup: true
cleanup: false
on:
branch: unstable
condition: "$TRAVIS_OS_NAME = linux"
# Stable packages (releases).
- provider: packagecloud
repository: pkgs
username: golift
token:
secure: PuwkeI7VlBBEpg9b6KsQy4lDEt10dQuDsZ1qVQBEllqUmpfRbn2EGk8b7nTiRTjfCVT9u1FX4I43MN/IBdgJPg9fI3YQcg5/lbEUrqDLtgo/MsP8pvMnXuhU+JuROdOHJP7/mVJrOOjDJBykTkHgtHhUcd7DcgNL5wytVdxU9szbeSns1MDK6ZPN2zxGYj9H7hmGGPWXSyNFwl87fL9629KEXUh7Ad85/G/EACdv1USz3ZHjOVt7KaUuaK/tnlyygH1WH5ynV5CRuVgcIivGPjsLqbPYGv1OUbg2bq6JcLBgXivmiN+CI6C0LjlZEgYxaEw0ynyCbBTGkRRWSez5LiMsGHfPQynrw7MA6ZCkzfdVHCPT4HSdTCTc6g4kLvf7q2HRVeED07e8RFaNWrxJyOCE05L5PhKHpTilkJjrFVV19hluM95L1xnNEGWRpkJxjrFqwf7l2Y425+pTYwa2wrLdtULkGyLA2Wf7EHqGY2f9LZ3g32In1/do34MCDO/STUBpwIR+PqvATmqbVM8/otq1wmJD5yGmb0U9dp1CPZ3jdKjzlVJ8x7FLVwXhIKZJIh7RdOm7zsfmWvRvQkx0MyFtA4eoekYig+AmJEA+fCCqBQgdB1FHKRoElDUCRw3nyhhYamt6rDdqPxVPVHi87iRdg+OcUEtPNFrUxZDaJHU=
dist: ubuntu/focal
local-dir: release
package_glob: "*.deb"
skip_cleanup: true
cleanup: false
on:
tags: true
condition: "$TRAVIS_OS_NAME = linux"
- provider: packagecloud
repository: pkgs
username: golift
token:
secure: PuwkeI7VlBBEpg9b6KsQy4lDEt10dQuDsZ1qVQBEllqUmpfRbn2EGk8b7nTiRTjfCVT9u1FX4I43MN/IBdgJPg9fI3YQcg5/lbEUrqDLtgo/MsP8pvMnXuhU+JuROdOHJP7/mVJrOOjDJBykTkHgtHhUcd7DcgNL5wytVdxU9szbeSns1MDK6ZPN2zxGYj9H7hmGGPWXSyNFwl87fL9629KEXUh7Ad85/G/EACdv1USz3ZHjOVt7KaUuaK/tnlyygH1WH5ynV5CRuVgcIivGPjsLqbPYGv1OUbg2bq6JcLBgXivmiN+CI6C0LjlZEgYxaEw0ynyCbBTGkRRWSez5LiMsGHfPQynrw7MA6ZCkzfdVHCPT4HSdTCTc6g4kLvf7q2HRVeED07e8RFaNWrxJyOCE05L5PhKHpTilkJjrFVV19hluM95L1xnNEGWRpkJxjrFqwf7l2Y425+pTYwa2wrLdtULkGyLA2Wf7EHqGY2f9LZ3g32In1/do34MCDO/STUBpwIR+PqvATmqbVM8/otq1wmJD5yGmb0U9dp1CPZ3jdKjzlVJ8x7FLVwXhIKZJIh7RdOm7zsfmWvRvQkx0MyFtA4eoekYig+AmJEA+fCCqBQgdB1FHKRoElDUCRw3nyhhYamt6rDdqPxVPVHi87iRdg+OcUEtPNFrUxZDaJHU=
dist: el/6
local-dir: release
package_glob: "*.rpm"
skip_cleanup: true
cleanup: false
on:
tags: true
condition: "$TRAVIS_OS_NAME = linux"
# Upload built files to github too.
- provider: releases
token:
secure: CEeczHbmPCs54puNInkE7pCwPrR13Rl054PVtfElsXGD62DoJB6DAW2M9XEEVQPAaCZHj8K1mTRKA6h0W1xSyT0YYZkcVRzrpqkntGo1swfRtPj3nnUCJEqvABrMJWv7c/145LmcoXpalxMCHVOioQJO87hZf+iV+Keb2HwIUTChglVpjcDtTeSrQlKSn58jiYSaVQs4cgdrXhlBFxTwgeyVBTbbg7nU036GgCnQoU9gzWZysa6XGuO4MyoehRfNj5RHIbPITWqmUSbxUHV4G25+SrcP2MBEdZawvWKSrnSvKdYuczhmhv9rVIxNNOM+jRqIpLlaJjY+o1kWL9OBT/e9eqyfpvG7b1sYWyuzQPPNH02hV5NyXLobXtWDpuL8gCbtF/dLTjsom2PGC/g0/aeJ0GvwmSA/c2P8Oc2AajHX9kJ9JSq1R7Kg0JKHFZRwsdUb1sfoc2oyO9sh7YpMDx/6eVnkTekbhpXLdJyJd4pWj6FLllZP6GMVQehyOUANADKZQ1yWH+gPUbgvieEjd54ZqZO5/yPzOI0eIw9j48BCMRgjkY5wZkUJ+lLjN5qMS5Zrc4rSI4kU0UKrvvr9O32EczV6f54lRxp9TK89NuPkkcbCAWa9iVasdONOho5TRKRirp3W3jqWm2rSbKWjPg9axJ2ts53I8w8ybMdyFRE=
overwrite: true
skip_cleanup: true
cleanup: false
file_glob: true
file: release/*
on:
tags: true
# Upload homebrew formula file to a special repo.
- provider: script
script: bash scripts/formula-deploy.sh
on:
tags: true
condition: "$TRAVIS_OS_NAME = osx"
# Upload aur PKGBUILD file to a special repo.
- provider: script
script: bash scripts/aur-deploy.sh
on:
tags: true
condition: "$TRAVIS_OS_NAME = linux"