Skip to content

Commit 16181ce

Browse files
committed
fix: build dashboard in ci
1 parent 592a290 commit 16181ce

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/build-release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,42 @@ permissions:
1414
contents: write
1515

1616
jobs:
17+
build-dashboard:
18+
name: Build Dashboard
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout Dashboard
22+
uses: actions/checkout@v4
23+
with:
24+
repository: PocketRelay/Dashboard
25+
ref: master
26+
path: dashboard
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: "20"
32+
cache: "npm"
33+
cache-dependency-path: dashboard/package-lock.json
34+
35+
- name: Install dashboard dependencies
36+
working-directory: dashboard
37+
run: npm ci
38+
39+
- name: Build dashboard
40+
working-directory: dashboard
41+
run: npm run build
42+
43+
- name: Upload dashboard artifact
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: dashboard-build
47+
path: dashboard/build/
48+
1749
build-linux:
1850
name: Build Linux targets
1951
runs-on: ubuntu-latest
52+
needs: [build-dashboard]
2053
strategy:
2154
matrix:
2255
include:
@@ -44,6 +77,14 @@ jobs:
4477
# Checkout the repo for building
4578
- uses: actions/checkout@v4
4679

80+
# Download the dashboard build artifact
81+
- name: Download dashboard artifact
82+
uses: actions/download-artifact@v4
83+
with:
84+
name: dashboard-build
85+
merge-multiple: true
86+
path: src/resources/public
87+
4788
# Setup rust for building the service
4889
- name: Set up Rust
4990
uses: dtolnay/rust-toolchain@stable
@@ -91,6 +132,7 @@ jobs:
91132
build-windows:
92133
name: Build Windows targets
93134
runs-on: windows-latest
135+
needs: [build-dashboard]
94136
strategy:
95137
matrix:
96138
include:
@@ -108,6 +150,14 @@ jobs:
108150
# Checkout the repo for building
109151
- uses: actions/checkout@v4
110152

153+
# Download the dashboard build artifact
154+
- name: Download dashboard artifact
155+
uses: actions/download-artifact@v4
156+
with:
157+
name: dashboard-build
158+
merge-multiple: true
159+
path: src/resources/public
160+
111161
# Setup rust for building the service
112162
- name: Install Rust
113163
uses: dtolnay/rust-toolchain@stable
@@ -173,6 +223,8 @@ jobs:
173223
uses: actions/download-artifact@v4
174224
with:
175225
path: dist
226+
# Only download the executables not the dashboard
227+
pattern: pocket-relay-*
176228
merge-multiple: true
177229

178230
# Create the github release if we pushed up a new tag

0 commit comments

Comments
 (0)