-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (67 loc) · 2.09 KB
/
ci.yaml
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
# vim: ft=yaml ts=2 et
name: CI
on:
push:
branches: [master]
tags: ['*']
pull_request:
jobs:
client-build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.19'
- run: go version
- name: Install Gox
run: go install github.com/mitchellh/gox@latest
- uses: actions/setup-node@v3
with:
node-version: 18
- run: node --version
- name: Install NSIS
run: sudo apt-get install -y nsis
- run: makensis -VERSION
- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- run: wails doctor
- name: Compile CLI clients
run: |
gox -osarch='linux/amd64 windows/amd64 darwin/arm64 darwin/amd64' \
-output='build/{{.Dir}}_{{.OS}}_{{.Arch}}' \
./cmd/client
- name: Compile Windows GUI client
run: scripts/build-windows.sh
- name: Move files around for final artifact upload
run: |
mv cmd/client_gui/build/bin/rvpn-amd64-installer.exe build/
- uses: actions/upload-artifact@v3
with:
name: binaries
path: build/
release:
runs-on: ubuntu-22.04
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs:
- client-build
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@master
with:
name: binaries
path: build/
- name: Build archives for release
run: |
for arch in amd64; do
mkdir -p build/package/rvpn_linux_$arch/{,bin/,systemd/}
cp build/client_linux_$arch build/package/rvpn_linux_$arch/bin/rvpn
cp -r support/systemd/ build/package/rvpn_linux_$arch/systemd/
tar --owner root --group root --sort name \
-C build/package/ -czvf rvpn_linux_$arch.tar.gz rvpn_linux_$arch
done
- uses: softprops/action-gh-release@v1
with:
files: |
rvpn_linux_*.tar.gz
build/rvpn-amd64-installer.exe