1010 description : " Create as draft release"
1111 type : boolean
1212 default : true
13+ include-testing :
14+ description : " Include Testing View"
15+ type : boolean
16+ default : true
17+ include-competition :
18+ description : " Include Competition View"
19+ type : boolean
20+ default : true
21+ include-flashing :
22+ description : " Include Flashing View"
23+ type : boolean
24+ default : true
1325
14- env :
15- FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 : true
1626
1727jobs :
1828 determine-version :
@@ -21,12 +31,18 @@ jobs:
2131 outputs :
2232 version : ${{ steps.get_version.outputs.version }}
2333 is_draft : ${{ steps.get_version.outputs.is_draft }}
34+ include_testing : ${{ steps.get_version.outputs.include_testing }}
35+ include_competition : ${{ steps.get_version.outputs.include_competition }}
36+ include_flashing : ${{ steps.get_version.outputs.include_flashing }}
2437 steps :
2538 - name : Determine version
2639 id : get_version
2740 run : |
2841 echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
2942 echo "is_draft=${{ github.event.inputs.draft }}" >> $GITHUB_OUTPUT
43+ echo "include_testing=${{ github.event.inputs.include-testing }}" >> $GITHUB_OUTPUT
44+ echo "include_competition=${{ github.event.inputs.include-competition }}" >> $GITHUB_OUTPUT
45+ echo "include_flashing=${{ github.event.inputs.include-flashing }}" >> $GITHUB_OUTPUT
3046
3147 create-draft-release :
3248 name : Create Draft Release
@@ -62,20 +78,46 @@ jobs:
6278
6379 - uses : actions/setup-node@v4
6480 with :
65- node-version : " 20 "
81+ node-version : " 24 "
6682
6783 - name : Install dependencies
6884 run : pnpm install --frozen-lockfile
6985
7086 - name : Build with Turbo
71- run : pnpm turbo build --filter=testing-view
87+ run : |
88+ FILTERS=""
89+ if [ "${{ needs.determine-version.outputs.include_testing }}" = "true" ]; then
90+ FILTERS="$FILTERS --filter=testing-view"
91+ fi
92+ if [ "${{ needs.determine-version.outputs.include_competition }}" = "true" ]; then
93+ FILTERS="$FILTERS --filter=competition-view"
94+ fi
95+ if [ "${{ needs.determine-version.outputs.include_flashing }}" = "true" ]; then
96+ FILTERS="$FILTERS --filter=flashing-view"
97+ fi
98+ pnpm turbo build $FILTERS
7299
73100 - uses : actions/upload-artifact@v4
101+ if : needs.determine-version.outputs.include_testing == 'true'
74102 with :
75103 name : frontend-dist
76104 path : frontend/testing-view/dist/**
77105 retention-days : 1
78106
107+ - uses : actions/upload-artifact@v4
108+ if : needs.determine-version.outputs.include_competition == 'true'
109+ with :
110+ name : competition-dist
111+ path : frontend/competition-view/dist/**
112+ retention-days : 1
113+
114+ - uses : actions/upload-artifact@v4
115+ if : needs.determine-version.outputs.include_flashing == 'true'
116+ with :
117+ name : flashing-dist
118+ path : frontend/flashing-view/dist/**
119+ retention-days : 1
120+
79121 build-backend :
80122 name : Build Backend - ${{ matrix.os }}
81123 needs : determine-version
@@ -121,22 +163,103 @@ jobs:
121163 path : electron-app/binaries/${{ matrix.binary }}
122164 retention-days : 1
123165
166+ build-blcu :
167+ name : Build BLCU - ${{ matrix.os }}
168+ needs : determine-version
169+ runs-on : ${{ matrix.os }}
170+ strategy :
171+ fail-fast : true
172+ matrix :
173+ include :
174+ - os : windows-latest
175+ binary : blcu-programming-windows-amd64.exe
176+ binary-base : blcu-programming-windows-amd64
177+ - os : ubuntu-latest
178+ binary : blcu-programming-linux-amd64
179+ binary-base : blcu-programming-linux-amd64
180+ - os : macos-latest
181+ binary : blcu-programming-darwin-arm64
182+ binary-base : blcu-programming-darwin-arm64
183+ - os : macos-15-intel
184+ binary : blcu-programming-darwin-amd64
185+ binary-base : blcu-programming-darwin-amd64
186+ steps :
187+ - uses : actions/checkout@v4
188+
189+ - uses : actions/setup-python@v5
190+ with :
191+ python-version : " 3.11"
192+
193+ - name : Create virtual environment
194+ working-directory : blcu-programming
195+ run : python -m venv .venv-build
196+
197+ - name : Install dependencies
198+ working-directory : blcu-programming
199+ shell : bash
200+ run : |
201+ if [ "${{ runner.os }}" = "Windows" ]; then
202+ .venv-build/Scripts/pip install -r requirements-build.txt
203+ else
204+ .venv-build/bin/pip install -r requirements-build.txt
205+ fi
206+
207+ - name : Build with PyInstaller
208+ working-directory : blcu-programming
209+ shell : bash
210+ run : |
211+ if [ "${{ runner.os }}" = "Windows" ]; then
212+ PYTHON=".venv-build/Scripts/python"
213+ else
214+ PYTHON=".venv-build/bin/python"
215+ fi
216+ if [ "${{ runner.os }}" = "Windows" ]; then
217+ PATH_SEP=";"
218+ else
219+ PATH_SEP=":"
220+ fi
221+ "$PYTHON" -m PyInstaller \
222+ --clean \
223+ --noconfirm \
224+ --onefile \
225+ --name "${{ matrix.binary-base }}" \
226+ --distpath "../electron-app/binaries" \
227+ --hidden-import uvicorn.loops.auto \
228+ --hidden-import uvicorn.protocols.http.auto \
229+ --hidden-import uvicorn.protocols.websockets.auto \
230+ --hidden-import uvicorn.lifespan.on \
231+ --hidden-import multipart \
232+ --hidden-import multipart.multiparser \
233+ --paths "." \
234+ --add-data "BLCU-config.json${PATH_SEP}." \
235+ api/main.py
236+
237+ - uses : actions/upload-artifact@v4
238+ with :
239+ name : blcu-${{ matrix.os }}
240+ path : electron-app/binaries/${{ matrix.binary }}
241+ retention-days : 1
242+
124243 package-and-upload :
125244 name : Package & Upload - ${{ matrix.os }}
126- needs : [determine-version, create-draft-release, build-frontend, build-backend]
245+ needs : [determine-version, create-draft-release, build-frontend, build-backend, build-blcu ]
127246 runs-on : ${{ matrix.os }}
128247 strategy :
129248 fail-fast : true
130249 matrix :
131250 include :
132251 - os : windows-latest
133252 binary : backend-windows-amd64.exe
253+ blcu-binary : blcu-programming-windows-amd64.exe
134254 - os : ubuntu-latest
135255 binary : backend-linux-amd64
256+ blcu-binary : blcu-programming-linux-amd64
136257 - os : macos-latest
137258 binary : backend-darwin-arm64
259+ blcu-binary : blcu-programming-darwin-arm64
138260 - os : macos-15-intel
139261 binary : backend-darwin-amd64
262+ blcu-binary : blcu-programming-darwin-amd64
140263 steps :
141264 - uses : actions/checkout@v4
142265
@@ -146,23 +269,44 @@ jobs:
146269 name : backend-${{ matrix.os }}
147270 path : electron-app/binaries
148271
272+ - name : Download BLCU binary
273+ uses : actions/download-artifact@v4
274+ with :
275+ name : blcu-${{ matrix.os }}
276+ path : electron-app/binaries
277+
149278 - name : Set executable permissions (Unix)
150279 if : runner.os != 'Windows'
151280 run : chmod +x electron-app/binaries/*
152281
153282 - name : Download frontend dist
283+ if : needs.determine-version.outputs.include_testing == 'true'
154284 uses : actions/download-artifact@v4
155285 with :
156286 name : frontend-dist
157287 path : electron-app/renderer/testing-view
158288
289+ - name : Download competition-view dist
290+ if : needs.determine-version.outputs.include_competition == 'true'
291+ uses : actions/download-artifact@v4
292+ with :
293+ name : competition-dist
294+ path : electron-app/renderer/competition-view
295+
296+ - name : Download flashing-view dist
297+ if : needs.determine-version.outputs.include_flashing == 'true'
298+ uses : actions/download-artifact@v4
299+ with :
300+ name : flashing-dist
301+ path : electron-app/renderer/flashing-view
302+
159303 - uses : pnpm/action-setup@v4
160304 with :
161305 version : 10.26.0
162306
163307 - uses : actions/setup-node@v4
164308 with :
165- node-version : " 20 "
309+ node-version : " 24 "
166310
167311 - name : Update version in package.json
168312 working-directory : electron-app
@@ -186,7 +330,7 @@ jobs:
186330 run : |
187331 find electron-app/dist -maxdepth 1 -type f \
188332 \( -name "*.exe" -o -name "*.AppImage" -o -name "*.deb" \
189- -o -name "*.dmg" -o -name "*.zip" -o -name "*.yml" -o -name "*.blockmap" \) \
333+ -o -name "*.rpm" -o -name "*. dmg" -o -name "*.zip" -o -name "*.yml" -o -name "*.blockmap" \) \
190334 | xargs gh release upload v${{ needs.determine-version.outputs.version }} --clobber
191335 env :
192336 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments