Skip to content

Commit 75ee8fd

Browse files
Merge pull request #18 from FritzBlignaut/feature/build
feat: add CI workflow for testing and building Linux DEB package
2 parents 2bbd02c + 8c62bd8 commit 75ee8fd

1 file changed

Lines changed: 73 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI — Test & Build Linux DEB
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
# ─── Job 1: Run all unit tests ────────────────────────────────────────────────
10+
test:
11+
name: Unit Tests
12+
runs-on: ubuntu-22.04
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '24'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Run unit tests
28+
run: npm run test:run
29+
30+
# ─── Job 2: Build the .deb installer (only runs when all tests pass) ──────────
31+
build:
32+
name: Build Linux DEB
33+
runs-on: ubuntu-22.04
34+
needs: test
35+
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v4
39+
40+
- name: Setup Node.js
41+
uses: actions/setup-node@v4
42+
with:
43+
node-version: '24'
44+
cache: 'npm'
45+
46+
# System libraries required to compile native modules:
47+
# node-hid → libudev-dev + libusb-1.0-0-dev
48+
# sharp → bundles its own libvips; only needs a C++ toolchain
49+
- name: Install system build dependencies
50+
run: |
51+
sudo apt-get update -y
52+
sudo apt-get install -y \
53+
libudev-dev \
54+
libusb-1.0-0-dev \
55+
build-essential \
56+
python3
57+
58+
- name: Install npm dependencies
59+
run: npm ci
60+
61+
- name: Build renderer (Vite)
62+
run: npm run build
63+
64+
- name: Package Linux DEB
65+
run: npx electron-builder --linux deb --publish=never
66+
67+
- name: Upload DEB artifact
68+
uses: actions/upload-artifact@v4
69+
with:
70+
name: tech-stack-streamdeck-linux-deb
71+
path: dist-electron/*.deb
72+
if-no-files-found: error
73+
retention-days: 30

0 commit comments

Comments
 (0)