-
Notifications
You must be signed in to change notification settings - Fork 0
153 lines (126 loc) · 4.65 KB
/
dashboard.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
name: Dashboard
on: [pull_request, push]
env:
NODE_VERSION: 20
jobs:
format:
name: Check Format
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/
- name: Install Node Modules
run: npm i --include=dev
working-directory: dashboard
- name: Check dashboard formatting
run: npm run format:check
working-directory: dashboard
build:
env:
MACOSX_DEPLOYMENT_TARGET: 13.3
strategy:
fail-fast: false
matrix:
include:
- artifact: Windows-x86_64
platform: windows-2022
build-flags: --target=x86_64-pc-windows-msvc
- artifact: Windows-arm64
platform: windows-2022
build-flags: --target=aarch64-pc-windows-msvc
- artifact: macOS-x86_64
platform: macOS-14
build-flags: --target=x86_64-apple-darwin
- artifact: macOS-arm64
platform: macOS-14
build-flags: --target=aarch64-apple-darwin
- artifact: Linux-x86_64
platform: ubuntu-22.04
build-flags: --target=x86_64-unknown-linux-gnu
name: "Build ${{ matrix.artifact }}"
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install System Dependencies (Ubuntu Only)
if: startsWith(matrix.platform, 'ubuntu')
run: |
sudo apt-get update -q
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- name: Install Node Modules
run: npm i --include=dev
working-directory: dashboard
- name: Install Windows aarch64 Rust compiler (Windows-arm64 Only)
if: matrix.artifact == 'Windows-arm64'
run: rustup target install aarch64-pc-windows-msvc
- name: Install macOS x86_64 Rust compiler (macOS-x86_64 Only)
if: matrix.artifact == 'macOS-x86_64'
run: rustup target add x86_64-apple-darwin
- name: Setup Xcode (macOS Only)
if: startsWith(matrix.platform, 'macOS')
run: sudo xcode-select -switch /Applications/Xcode_15.3.app
- name: Run Tauri Build
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: dashboard
args: ${{ matrix.build-flags }}
- name: Upload bundle (Windows-x86_54)
if: matrix.artifact == 'Windows-x86_64'
uses: actions/upload-artifact@v4
with:
name: GRRDashboard-${{ matrix.artifact }}
path: dashboard/src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe
- name: Upload bundle (Windows-arm64)
if: matrix.artifact == 'Windows-arm64'
uses: actions/upload-artifact@v4
with:
name: GRRDashboard-${{ matrix.artifact }}
path: dashboard/src-tauri/target/aarch64-pc-windows-msvc/release/bundle/nsis/*.exe
- name: Upload bundle (macOS-x86_64)
if: matrix.artifact == 'macOS-x86_64'
uses: actions/upload-artifact@v4
with:
name: GRRDashboard-${{ matrix.artifact }}
path: dashboard/src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg
- name: Upload bundle (macOS-arm64)
if: matrix.artifact == 'macOS-arm64'
uses: actions/upload-artifact@v4
with:
name: GRRDashboard-${{ matrix.artifact }}
path: dashboard/src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg
- name: Upload bundle (Linux-x86_64)
if: matrix.artifact == 'Linux-x86_64'
uses: actions/upload-artifact@v4
with:
name: GRRDashboard-${{ matrix.artifact }}
path: |
dashboard/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage
dashboard/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb
dashboard/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/rpm/*.rpm