-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (98 loc) · 3.28 KB
/
bridge-controller.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
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
on: [push]
name: Bridge Controller
jobs:
build-and-test:
name: ${{ matrix.target }} Build and Test
strategy:
matrix:
target: [Windows, Linux]
include:
- target: Windows
os: windows-latest
- target: Linux
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install tauri dependencies
if: ${{ matrix.target == 'Linux' }}
run: >-
sudo apt-get update &&
sudo apt-get install --assume-yes \
libwebkit2gtk-4.0-dev \
build-essential \
curl \
wget \
file \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install Protoc
uses: arduino/setup-protoc@v2
- name: Run clippy
if: ${{ matrix.target == 'Linux' }}
run: cargo clippy --all-targets --all-features -- -D warnings
working-directory: ./src-tauri
- name: Run rust tests
run: cargo test
working-directory: ./src-tauri
# TODO: run front-end tests
- name: Install node
uses: actions/setup-node@v3
with:
node-version: latest
- name: Install node dependencies
run: npm install
- name: Build bundles
run: npm run tauri build
- name: Upload app image
if: ${{ matrix.target == 'Linux' }}
uses: actions/upload-artifact@v3
with:
name: bridge-controller-appimage
path: src-tauri/target/release/bundle/appimage/bridge-controller_*_amd64.AppImage
if-no-files-found: error
- name: Upload Debian package
if: ${{ matrix.target == 'Linux' }}
uses: actions/upload-artifact@v3
with:
name: bridge-controller-deb
path: src-tauri/target/release/bundle/deb/bridge-controller_*_amd64.deb
if-no-files-found: error
- name: Upload Windows msi installer
if: ${{ matrix.target == 'Windows' }}
uses: actions/upload-artifact@v3
with:
name: bridge-controller-msi
path: src-tauri\target\release\bundle\msi\bridge-controller_*_x64_en-US.msi
if-no-files-found: error
- name: Upload Windows exe binary
if: ${{ matrix.target == 'Windows' }}
uses: actions/upload-artifact@v3
with:
name: bridge-controller-exe
path: src-tauri\target\release\bundle\nsis\bridge-controller_*_x64-setup.exe
if-no-files-found: error
release:
needs: build-and-test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Download Debian package
uses: actions/download-artifact@v3
with:
name: bridge-controller-deb
path: .
if-no-files-found: error
- name: Packagecloud Upload
uses: computology/[email protected]
with:
PACKAGE-NAME: ./bridge-controller*.deb
PACKAGECLOUD-USERNAME: kristian_mika
PACKAGECLOUD-REPONAME: mpc-bridge/ubuntu/jammy/release
PACKAGECLOUD-TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}