feat(workflows): add build-zip task for Electron ZIP archive and update build process to include ZIP artifact collection
This commit is contained in:
@@ -39,8 +39,10 @@ jobs:
|
|||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
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
|
- name: Setup Task
|
||||||
uses: https://git.quad4.io/actions/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1
|
uses: https://git.quad4.io/actions/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1
|
||||||
@@ -67,12 +69,33 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: task build-flatpak
|
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: |
|
run: |
|
||||||
mkdir -p release-assets
|
mkdir -p release-assets
|
||||||
(cd meshchatx/public && zip -r ../../release-assets/meshchatx-frontend.zip .)
|
|
||||||
# Collect Linux artifacts
|
# 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/ \;
|
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
|
- name: Upload artifacts
|
||||||
uses: https://git.quad4.io/actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3.2.1
|
uses: https://git.quad4.io/actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3.2.1
|
||||||
|
|||||||
@@ -72,7 +72,8 @@ jobs:
|
|||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
- name: Setup Task
|
||||||
uses: https://git.quad4.io/actions/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1
|
uses: https://git.quad4.io/actions/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1
|
||||||
@@ -102,6 +103,9 @@ jobs:
|
|||||||
- name: Build Electron App (Windows EXE and NSIS)
|
- name: Build Electron App (Windows EXE and NSIS)
|
||||||
run: pnpm run dist:windows
|
run: pnpm run dist:windows
|
||||||
|
|
||||||
|
- name: Build Electron App (ZIP)
|
||||||
|
run: task build-zip
|
||||||
|
|
||||||
- name: Prepare release assets
|
- name: Prepare release assets
|
||||||
run: |
|
run: |
|
||||||
mkdir -p release-assets
|
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/ \;
|
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
|
# Windows artifacts
|
||||||
find dist -maxdepth 1 -type f \( -name "*-win*.exe" \) -exec cp {} release-assets/ \;
|
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
|
# Python artifacts
|
||||||
find python-dist -maxdepth 1 -type f -name "*.whl" -exec cp {} release-assets/ \;
|
find python-dist -maxdepth 1 -type f -name "*.whl" -exec cp {} release-assets/ \;
|
||||||
|
|
||||||
|
|||||||
@@ -18,4 +18,3 @@ jobs:
|
|||||||
|
|
||||||
- name: OSV scan
|
- name: OSV scan
|
||||||
run: bash scripts/osv_scan.sh
|
run: bash scripts/osv_scan.sh
|
||||||
|
|
||||||
|
|||||||
@@ -239,6 +239,12 @@ tasks:
|
|||||||
cmds:
|
cmds:
|
||||||
- "{{.NPM}} run dist:windows"
|
- "{{.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:
|
build-electron-all:
|
||||||
desc: Build all Electron apps (Linux and Windows)
|
desc: Build all Electron apps (Linux and Windows)
|
||||||
deps: [build-frontend]
|
deps: [build-frontend]
|
||||||
|
|||||||
Reference in New Issue
Block a user