From e801315fbdd57fc2fb769a9d1f5e87050376ddd8 Mon Sep 17 00:00:00 2001 From: OpenClaw Bot Date: Sat, 14 Mar 2026 21:24:46 +0000 Subject: [PATCH] ci: add Gitea workflows for electron AppImages --- .gitea/workflows/electron-linux-amd64.yml | 54 +++++++++++++++++++++++ .gitea/workflows/electron-linux-arm64.yml | 54 +++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 .gitea/workflows/electron-linux-amd64.yml create mode 100644 .gitea/workflows/electron-linux-arm64.yml diff --git a/.gitea/workflows/electron-linux-amd64.yml b/.gitea/workflows/electron-linux-amd64.yml new file mode 100644 index 0000000..c49d0ea --- /dev/null +++ b/.gitea/workflows/electron-linux-amd64.yml @@ -0,0 +1,54 @@ +name: electron-linux-amd64 + +on: + push: + branches: [ main ] + tags: [ 'v*' ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + electron-linux-amd64: + runs-on: amd64-native + steps: + - uses: actions/checkout@v4 + + - name: Install Linux packages for electron build + run: | + set -eu + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential curl git python3 python3-pip xz-utils libgtk-3-0 libnotify4 libnss3 libxss1 libasound2 libatk1.0-0 libatk-bridge2.0-0 libglib2.0-0 libx11-6 libgdk-pixbuf2.0-0 libpango-1.0-0 libxrandr2 libxinerama1 libxcursor1 libxi6 libfontconfig1 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install npm dependencies + run: | + set -eu + npm ci + + - name: Build AppImage (amd64) + run: | + set -eu + npm run build:linux:amd64 + + - name: Collect run-specific artifact + run: | + set -eu + rm -rf artifacts + mkdir -p artifacts + appimage=$(find dist -maxdepth 1 -type f -name '*.AppImage' | head -n 1 || true) + [ -n "$appimage" ] || { echo 'AppImage missing'; exit 1; } + cp "$appimage" "artifacts/electron_tray_demo-linux-amd64-run${{ github.run_number }}.AppImage" + chmod +x "artifacts/electron_tray_demo-linux-amd64-run${{ github.run_number }}.AppImage" + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: electron_tray_demo-linux-amd64-run${{ github.run_number }} + path: artifacts/ + retention-days: 14 diff --git a/.gitea/workflows/electron-linux-arm64.yml b/.gitea/workflows/electron-linux-arm64.yml new file mode 100644 index 0000000..c870d3a --- /dev/null +++ b/.gitea/workflows/electron-linux-arm64.yml @@ -0,0 +1,54 @@ +name: electron-linux-arm64 + +on: + push: + branches: [ main ] + tags: [ 'v*' ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + electron-linux-arm64: + runs-on: arm64-native + steps: + - uses: actions/checkout@v4 + + - name: Install Linux packages for electron build + run: | + set -eu + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential curl git python3 python3-pip xz-utils libgtk-3-0 libnotify4 libnss3 libxss1 libasound2 libatk1.0-0 libatk-bridge2.0-0 libglib2.0-0 libx11-6 libgdk-pixbuf2.0-0 libpango-1.0-0 libxrandr2 libxinerama1 libxcursor1 libxi6 libfontconfig1 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install npm dependencies + run: | + set -eu + npm ci + + - name: Build AppImage (arm64) + run: | + set -eu + npm run build:linux:arm64 + + - name: Collect run-specific artifact + run: | + set -eu + rm -rf artifacts + mkdir -p artifacts + appimage=$(find dist -maxdepth 1 -type f -name '*.AppImage' | head -n 1 || true) + [ -n "$appimage" ] || { echo 'AppImage missing'; exit 1; } + cp "$appimage" "artifacts/electron_tray_demo-linux-arm64-run${{ github.run_number }}.AppImage" + chmod +x "artifacts/electron_tray_demo-linux-arm64-run${{ github.run_number }}.AppImage" + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: electron_tray_demo-linux-arm64-run${{ github.run_number }} + path: artifacts/ + retention-days: 14