forked from v2rayA/v2rayA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
166 lines (161 loc) · 12 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
os:
- linux
language:
- go
- node_js
- ruby
go:
- 1.16.x
if: (tag =~ ^v) OR (tag =~ ^test) OR (branch = master) OR (branch == test)
env:
global:
- NODE_VERSION="lts/*"
- GO111MODULE=on
- NAME=v2raya
- VERSION=$(git describe --abbrev=0 --tags)
- GOPROXY=https://goproxy.io
- DESC="A web GUI client of Project V which supports VMess, VLESS, SS, SSR, Trojan and Pingtunnel protocols."
addons:
apt:
packages:
- bsdtar
- rpm
- lintian
- reprepro
- gnupg
- gnupg2
- expect
- tar
before_install:
- nvm install $NODE_VERSION
install:
- go get github.com/mitchellh/gox
- gem install fpm -v 1.11.0
script:
- cd service && CGO_ENABLED=0 gox -ldflags '-extldflags "-static"' -osarch="linux/386 linux/amd64 linux/arm linux/arm64" -ldflags="-X github.com/v2rayA/v2rayA/global.Version=${VERSION:1} -s -w" -output="../v2raya_{{.OS}}_{{.Arch}}_$VERSION"
- cd ../gui && yarn && yarn build && cd ../ && tar -zcvf web.tar.gz ./web
- files="web=/etc/v2raya install/universal/v2raya.service=/etc/systemd/system/v2raya.service install/universal/v2raya.png=/usr/share/icons/hicolor/512x512/apps/v2raya.png install/universal/v2raya.desktop=/usr/share/applications/v2raya.desktop"
- params="--verbose -f -n $NAME -v ${VERSION:1} --url https://github.com/v2rayA/v2raya --maintainer v2rayA --after-install install/universal/after_install.sh --after-upgrade install/universal/after_upgrade.sh --before-remove install/universal/before_remove.sh --after-remove install/universal/after_remove.sh"
- fpm -s dir -t deb -p installer_debian_i386_$VERSION.deb --description "$DESC" $params --architecture i386 v2raya_linux_386_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t deb -p installer_debian_amd64_$VERSION.deb --description "$DESC" $params --architecture=amd64 v2raya_linux_amd64_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t deb -p installer_debian_armel_$VERSION.deb --description "$DESC" $params --architecture=armel v2raya_linux_arm_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t deb -p installer_debian_armhf_$VERSION.deb --description "$DESC" $params --architecture=armhf v2raya_linux_arm_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t deb -p installer_debian_aarch64_$VERSION.deb --description "$DESC" $params --architecture=aarch64 v2raya_linux_arm64_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t deb -p installer_debian_arm64_$VERSION.deb --description "$DESC" $params --architecture=arm64 v2raya_linux_arm64_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t deb -p installer_debian_armv8_$VERSION.deb --description "$DESC" $params --architecture=armv8 v2raya_linux_arm64_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t rpm -p installer_redhat_i386_$VERSION.rpm --description "$DESC" $params --architecture=i386 v2raya_linux_386_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t rpm -p installer_redhat_amd64_$VERSION.rpm --description "$DESC" $params --architecture=amd64 v2raya_linux_amd64_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t rpm -p installer_redhat_armel_$VERSION.rpm --description "$DESC" $params --architecture=armel v2raya_linux_arm_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t rpm -p installer_redhat_armhf_$VERSION.rpm --description "$DESC" $params --architecture=armhf v2raya_linux_arm_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t rpm -p installer_redhat_aarch64_$VERSION.rpm --description "$DESC" $params --architecture=aarch64 v2raya_linux_arm64_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t rpm -p installer_redhat_arm64_$VERSION.rpm --description "$DESC" $params --architecture=arm64 v2raya_linux_arm64_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t rpm -p installer_redhat_armv8_$VERSION.rpm --description "$DESC" $params --architecture=armv8 v2raya_linux_arm64_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t pacman -p installer_archlinux_i386_$VERSION.pkg.tar.xz --description "$DESC" $params --architecture=i386 v2raya_linux_386_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t pacman -p installer_archlinux_amd64_$VERSION.pkg.tar.xz --description "$DESC" $params --architecture=amd64 v2raya_linux_amd64_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t pacman -p installer_archlinux_armel_$VERSION.pkg.tar.xz --description "$DESC" $params --architecture=armel v2raya_linux_arm_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t pacman -p installer_archlinux_armhf_$VERSION.pkg.tar.xz --description "$DESC" $params --architecture=armhf v2raya_linux_arm_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t pacman -p installer_archlinux_aarch64_$VERSION.pkg.tar.xz --description "$DESC" $params --architecture=aarch64 v2raya_linux_arm64_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t pacman -p installer_archlinux_arm64_$VERSION.pkg.tar.xz --description "$DESC" $params --architecture=arm64 v2raya_linux_arm64_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t pacman -p installer_archlinux_armv8_$VERSION.pkg.tar.xz --description "$DESC" $params --architecture=armv8 v2raya_linux_arm64_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t freebsd -p installer_freebsd_i386_$VERSION.txz $params --description "$DESC" --architecture=i386 v2raya_linux_386_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t freebsd -p installer_freebsd_amd64_$VERSION.txz $params --description "$DESC" --architecture=amd64 v2raya_linux_amd64_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t freebsd -p installer_freebsd_armel_$VERSION.txz $params --description "$DESC" --architecture=armel v2raya_linux_arm_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t freebsd -p installer_freebsd_armhf_$VERSION.txz $params --description "$DESC" --architecture=armhf v2raya_linux_arm_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t freebsd -p installer_freebsd_aarch64_$VERSION.txz $params --description "$DESC" --architecture=aarch64 v2raya_linux_arm64_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t freebsd -p installer_freebsd_arm64_$VERSION.txz $params --description "$DESC" --architecture=arm64 v2raya_linux_arm64_$VERSION=/usr/bin/v2raya $files
- fpm -s dir -t freebsd -p installer_freebsd_armv8_$VERSION.txz $params --description "$DESC" --architecture=armv8 v2raya_linux_arm64_$VERSION=/usr/bin/v2raya $files
before_deploy:
if [[ $(pwd) =~ /apt$ ]]; then
echo 'Now in subdir "apt"' &&
cp -rf ../install/debian/key ../install/debian/conf ./;
else
mkdir -p apt/incoming && cp -r install/debian/key install/debian/conf apt/ && cd apt;
fi &&
gpg2 --import key/public-key.asc &&
../install/tool/gpg2_expect --allow-secret-key-import --import ../install/debian/private-key.asc &&
../install/tool/reprepro_expect --ask-passphrase -Vb . export &&
../install/tool/reprepro_expect --ask-passphrase -Vb . includedeb v2raya ../installer_debian_i386_$VERSION.deb &&
../install/tool/reprepro_expect --ask-passphrase -Vb . includedeb v2raya ../installer_debian_amd64_$VERSION.deb &&
../install/tool/reprepro_expect --ask-passphrase -Vb . includedeb v2raya ../installer_debian_armel_$VERSION.deb &&
../install/tool/reprepro_expect --ask-passphrase -Vb . includedeb v2raya ../installer_debian_armhf_$VERSION.deb &&
../install/tool/reprepro_expect --ask-passphrase -Vb . includedeb v2raya ../installer_debian_aarch64_$VERSION.deb &&
../install/tool/reprepro_expect --ask-passphrase -Vb . includedeb v2raya ../installer_debian_arm64_$VERSION.deb &&
../install/tool/reprepro_expect --ask-passphrase -Vb . includedeb v2raya ../installer_debian_armv8_$VERSION.deb &&
cp ../v2raya_linux_*_$VERSION pool/main/v/v2raya/ &&
cp ../web.tar.gz pool/main/v/v2raya/web_$VERSION.tar.gz &&
echo "apt.v2raya.mzz.pub" > CNAME &&
cd ../ &&
export srcdir=$(pwd)
deploy:
- provider: pages
skip_cleanup: true
github_token:
secure: dI7F0zR8lks/+Nk1RZ41V8jidKSXJRDkUFhjRkQFLO3NE2wCwlftSCEMhRa0ULqyskCmboKmVAAbCZupttFynWaj9ttpa2UWng+EfNtwEOvB0wp8b2CCV13Y/ncvaofIULWGJsjNbPAILkMp4YTfs92GslxGcLAJqAL3/P7O3Tx8AO7l7WzkVOC31sO5ZApb4kzb58T5IWY7mDZ9gSvjC4iyBGMwFG8YZXmknxTHVsDNWXvZwmScDB3VTu+X6U3aEVvdOYlmcqxDOzc8ZFGSpw6R4Dy2/KUH99UtofrF/buQauPmUq8Znu8u0LePtNI9ePxACqokPo8e+4MyE1ipVgoirgZmS2ICLnXTsSrwmNQ8S3+alOZW/+Kfo1v9Besfia9DoWUxOinRlGLVmnWFbMasRxKsqLfR2q3rSpWU4cKbH5WpxHewBnYqa86Xwp9G2O4MLpe6Ct7MLOiLonBXnUb2hXZGri8y87lTAUugxj/wSqXucw5SSDbRJT9v6Zwk5Eaj7Fc8QNTt7eqhVvmE8UucQPy1TL3gkTYFtUDkngWV0d0Y4JOHQW4ZUd28WLWIEyFoLZ8ZUT/kx87E69BhsqTq5S6tFRmWUXNLUpSrxJq29UdFy6zgNJhxgxxXXVpUH6wYHqV7nDCsZygJ5Z+iTTbkt+e1bIkhXbf/fM4+Yws=
keep_history: false
repo: v2rayA/v2raya-apt
target_branch: master
local_dir: apt/
on:
tags: true
- provider: pages
skip_cleanup: true
github_token:
secure: dI7F0zR8lks/+Nk1RZ41V8jidKSXJRDkUFhjRkQFLO3NE2wCwlftSCEMhRa0ULqyskCmboKmVAAbCZupttFynWaj9ttpa2UWng+EfNtwEOvB0wp8b2CCV13Y/ncvaofIULWGJsjNbPAILkMp4YTfs92GslxGcLAJqAL3/P7O3Tx8AO7l7WzkVOC31sO5ZApb4kzb58T5IWY7mDZ9gSvjC4iyBGMwFG8YZXmknxTHVsDNWXvZwmScDB3VTu+X6U3aEVvdOYlmcqxDOzc8ZFGSpw6R4Dy2/KUH99UtofrF/buQauPmUq8Znu8u0LePtNI9ePxACqokPo8e+4MyE1ipVgoirgZmS2ICLnXTsSrwmNQ8S3+alOZW/+Kfo1v9Besfia9DoWUxOinRlGLVmnWFbMasRxKsqLfR2q3rSpWU4cKbH5WpxHewBnYqa86Xwp9G2O4MLpe6Ct7MLOiLonBXnUb2hXZGri8y87lTAUugxj/wSqXucw5SSDbRJT9v6Zwk5Eaj7Fc8QNTt7eqhVvmE8UucQPy1TL3gkTYFtUDkngWV0d0Y4JOHQW4ZUd28WLWIEyFoLZ8ZUT/kx87E69BhsqTq5S6tFRmWUXNLUpSrxJq29UdFy6zgNJhxgxxXXVpUH6wYHqV7nDCsZygJ5Z+iTTbkt+e1bIkhXbf/fM4+Yws=
keep_history: false
repo: v2rayA/v2raya-web
target_branch: master
local_dir: web/
on:
branch: master
- provider: script
skip_cleanup: true
script: bash install/aur/deploy.sh
on:
tags: true
- provider: releases
api_key:
secure: dI7F0zR8lks/+Nk1RZ41V8jidKSXJRDkUFhjRkQFLO3NE2wCwlftSCEMhRa0ULqyskCmboKmVAAbCZupttFynWaj9ttpa2UWng+EfNtwEOvB0wp8b2CCV13Y/ncvaofIULWGJsjNbPAILkMp4YTfs92GslxGcLAJqAL3/P7O3Tx8AO7l7WzkVOC31sO5ZApb4kzb58T5IWY7mDZ9gSvjC4iyBGMwFG8YZXmknxTHVsDNWXvZwmScDB3VTu+X6U3aEVvdOYlmcqxDOzc8ZFGSpw6R4Dy2/KUH99UtofrF/buQauPmUq8Znu8u0LePtNI9ePxACqokPo8e+4MyE1ipVgoirgZmS2ICLnXTsSrwmNQ8S3+alOZW/+Kfo1v9Besfia9DoWUxOinRlGLVmnWFbMasRxKsqLfR2q3rSpWU4cKbH5WpxHewBnYqa86Xwp9G2O4MLpe6Ct7MLOiLonBXnUb2hXZGri8y87lTAUugxj/wSqXucw5SSDbRJT9v6Zwk5Eaj7Fc8QNTt7eqhVvmE8UucQPy1TL3gkTYFtUDkngWV0d0Y4JOHQW4ZUd28WLWIEyFoLZ8ZUT/kx87E69BhsqTq5S6tFRmWUXNLUpSrxJq29UdFy6zgNJhxgxxXXVpUH6wYHqV7nDCsZygJ5Z+iTTbkt+e1bIkhXbf/fM4+Yws=
file:
- "v2raya_linux_386_$VERSION"
- "v2raya_linux_amd64_$VERSION"
- "v2raya_linux_arm_$VERSION"
- "v2raya_linux_arm64_$VERSION"
- "installer_debian_i386_$VERSION.deb"
- "installer_debian_amd64_$VERSION.deb"
- "installer_debian_armel_$VERSION.deb"
- "installer_debian_armhf_$VERSION.deb"
- "installer_debian_aarch64_$VERSION.deb"
- "installer_debian_arm64_$VERSION.deb"
- "installer_debian_armv8_$VERSION.deb"
- "installer_freebsd_i386_$VERSION.txz"
- "installer_freebsd_amd64_$VERSION.txz"
- "installer_freebsd_armel_$VERSION.txz"
- "installer_freebsd_armhf_$VERSION.txz"
- "installer_freebsd_aarch64_$VERSION.txz"
- "installer_freebsd_arm64_$VERSION.txz"
- "installer_freebsd_armv8_$VERSION.txz"
- "installer_redhat_i386_$VERSION.rpm"
- "installer_redhat_amd64_$VERSION.rpm"
- "installer_redhat_armel_$VERSION.rpm"
- "installer_redhat_armhf_$VERSION.rpm"
- "installer_redhat_aarch64_$VERSION.rpm"
- "installer_redhat_arm64_$VERSION.rpm"
- "installer_redhat_armv8_$VERSION.rpm"
- "installer_archlinux_i386_$VERSION.pkg.tar.xz"
- "installer_archlinux_amd64_$VERSION.pkg.tar.xz"
- "installer_archlinux_armel_$VERSION.pkg.tar.xz"
- "installer_archlinux_armhf_$VERSION.pkg.tar.xz"
- "installer_archlinux_aarch64_$VERSION.pkg.tar.xz"
- "installer_archlinux_arm64_$VERSION.pkg.tar.xz"
- "installer_archlinux_armv8_$VERSION.pkg.tar.xz"
skip_cleanup: true
draft: true
overwrite: true
on:
tags: true
after_deploy: |
curl -X POST "https://api.cloudflare.com/client/v4/zones/$CF_ZONE/purge_cache" \
-H "X-Auth-Email: $CF_AUTH_EMAIL" \
-H "Authorization: Bearer $CF_PARGE_CACHE_AUTH_KEY" \
-H "Content-Type: application/json" \
--data '{"purge_everything":true}'