feat(workflows): add build-zip task for Electron ZIP archive and update build process to include ZIP artifact collection

This commit is contained in:
2026-01-03 20:54:33 -06:00
parent c028da2485
commit cc5b4a9f0d
4 changed files with 39 additions and 5 deletions

View File

@@ -39,8 +39,10 @@ jobs:
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y patchelf libopusfile0 ffmpeg espeak-ng zip rpm flatpak flatpak-builder elfutils
sudo apt-get install -y patchelf libopusfile0 ffmpeg espeak-ng wine nsis zip rpm flatpak flatpak-builder elfutils appstream appstream-util
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# Install runtimes required for Flatpak build
flatpak install --user -y flathub org.freedesktop.Platform//24.08 org.freedesktop.Sdk//24.08 org.electronjs.Electron2.BaseApp//24.08
- name: Setup Task
uses: https://git.quad4.io/actions/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1
@@ -67,12 +69,33 @@ jobs:
continue-on-error: true
run: task build-flatpak
- name: Prepare Frontend Zip
- name: Build Electron App (Windows EXE and NSIS)
run: pnpm run dist:windows
- name: Build Electron App (ZIP)
run: task build-zip
- name: Prepare release assets
run: |
mkdir -p release-assets
(cd meshchatx/public && zip -r ../../release-assets/meshchatx-frontend.zip .)
# Collect Linux artifacts
find dist -maxdepth 1 -type f \( -name "*-linux*.AppImage" -o -name "*-linux*.deb" -o -name "*-linux*.rpm" -o -name "*-linux*.flatpak" \) -exec cp {} release-assets/ \;
# Collect Windows artifacts
find dist -maxdepth 1 -type f \( -name "*-win*.exe" \) -exec cp {} release-assets/ \;
# Collect ZIP artifacts from Electron Forge
find out/make -type f -name "*.zip" -exec cp {} release-assets/ \;
# Collect Python artifacts
find python-dist -maxdepth 1 -type f -name "*.whl" -exec cp {} release-assets/ \;
# Create frontend zip
(cd meshchatx/public && zip -r ../../release-assets/meshchatx-frontend.zip .)
# Generate checksums
cd release-assets
for file in *; do
if [ -f "$file" ] && [[ "$file" != *.sha256 ]]; then
sha256sum "$file" | tee "${file}.sha256"
fi
done
- name: Upload artifacts
uses: https://git.quad4.io/actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3.2.1

View File

@@ -72,7 +72,8 @@ jobs:
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y patchelf libopusfile0 ffmpeg espeak-ng wine nsis zip rpm flatpak flatpak-builder
sudo apt-get install -y patchelf libopusfile0 ffmpeg espeak-ng wine nsis zip rpm flatpak flatpak-builder elfutils
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
- name: Setup Task
uses: https://git.quad4.io/actions/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1
@@ -102,6 +103,9 @@ jobs:
- name: Build Electron App (Windows EXE and NSIS)
run: pnpm run dist:windows
- name: Build Electron App (ZIP)
run: task build-zip
- name: Prepare release assets
run: |
mkdir -p release-assets
@@ -110,6 +114,8 @@ jobs:
find dist -maxdepth 1 -type f \( -name "*-linux*.AppImage" -o -name "*-linux*.deb" -o -name "*-linux*.rpm" -o -name "*-linux*.flatpak" \) -exec cp {} release-assets/ \;
# Windows artifacts
find dist -maxdepth 1 -type f \( -name "*-win*.exe" \) -exec cp {} release-assets/ \;
# ZIP artifacts from Electron Forge
find out/make -type f -name "*.zip" -exec cp {} release-assets/ \;
# Python artifacts
find python-dist -maxdepth 1 -type f -name "*.whl" -exec cp {} release-assets/ \;

View File

@@ -18,4 +18,3 @@ jobs:
- name: OSV scan
run: bash scripts/osv_scan.sh

View File

@@ -239,6 +239,12 @@ tasks:
cmds:
- "{{.NPM}} run dist:windows"
build-zip:
desc: Build Electron ZIP archive using Electron Forge
deps: [build-frontend]
cmds:
- "{{.NPM}} run dist:zip"
build-electron-all:
desc: Build all Electron apps (Linux and Windows)
deps: [build-frontend]