From 5ffbad3c655f14a7053f1e61f6fa5b260b72f4f6 Mon Sep 17 00:00:00 2001 From: Zac Gaetano Date: Mon, 6 Apr 2026 23:28:25 -0400 Subject: [PATCH] ci: target self-hosted linux runner, comment out windows job until runner added --- .forgejo/workflows/build.yml | 111 ++++++++++++++--------------------- 1 file changed, 44 insertions(+), 67 deletions(-) diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index 9997e80..38b48e8 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -1,5 +1,10 @@ name: Build Dragon Wind Desktop +# Runs on every push to main and on version tags. +# Self-hosted runner (TrueNAS) handles Linux builds. +# Windows .exe is built via manual trigger on a Windows machine, +# or by adding a Windows runner in future. + on: push: branches: [main] @@ -10,73 +15,15 @@ on: workflow_dispatch: # allow manual trigger from Forgejo UI jobs: - # ── Windows .exe ──────────────────────────────────────────────────────────── - build-windows: - name: Windows (.exe) - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Build Windows installer - run: npm run build:win - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Upload .exe artifact - uses: actions/upload-artifact@v4 - with: - name: dragon-wind-windows - path: dist/*.exe - retention-days: 30 - - # ── macOS .dmg ────────────────────────────────────────────────────────────── - build-mac: - name: macOS (.dmg) - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Build macOS DMG - run: npm run build:mac - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Upload .dmg artifact - uses: actions/upload-artifact@v4 - with: - name: dragon-wind-mac - path: dist/*.dmg - retention-days: 30 - - # ── Linux AppImage ─────────────────────────────────────────────────────────── + # ── Linux AppImage (self-hosted TrueNAS runner) ─────────────────────────── build-linux: name: Linux (AppImage) - runs-on: ubuntu-latest + runs-on: ubuntu-latest # matched by truenas-runner label steps: - name: Checkout uses: actions/checkout@v4 - - name: Set up Node.js + - name: Set up Node.js 20 uses: actions/setup-node@v4 with: node-version: '20' @@ -85,25 +32,52 @@ jobs: - name: Install dependencies run: npm ci - - name: Install Linux build deps - run: sudo apt-get install -y libgtk-3-dev libnotify-dev libnss3 libxss1 + - name: Install Linux native deps + run: | + apt-get update -qq + apt-get install -y --no-install-recommends \ + libgtk-3-dev libnotify-dev libnss3 libxss1 \ + libgbm-dev libasound2-dev - name: Build Linux AppImage run: npm run build:linux env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # electron-builder needs this so it doesn't try to notarise + CSC_IDENTITY_AUTO_DISCOVERY: false - name: Upload AppImage artifact uses: actions/upload-artifact@v4 with: - name: dragon-wind-linux + name: dragon-wind-linux-${{ github.sha }} path: dist/*.AppImage retention-days: 30 - # ── Release (on tag push) ──────────────────────────────────────────────────── + # ── Windows .exe (NOTE: needs a Windows runner) ─────────────────────────── + # To enable this job: + # 1. Set up a Windows machine with the Forgejo runner agent + # 2. Register it with label: windows-latest + # Then uncomment this job. + # + # build-windows: + # name: Windows (.exe) + # runs-on: windows-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-node@v4 + # with: { node-version: '20', cache: 'npm' } + # - run: npm ci + # - run: npm run build:win + # env: { GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" } + # - uses: actions/upload-artifact@v4 + # with: + # name: dragon-wind-windows-${{ github.sha }} + # path: dist/*.exe + # retention-days: 30 + + # ── Release (on tag push only) ──────────────────────────────────────────── release: name: Create Release - needs: [build-windows, build-mac, build-linux] + needs: [build-linux] runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/v') steps: @@ -112,6 +86,9 @@ jobs: with: path: artifacts/ + - name: List artifacts + run: find artifacts/ -type f + - name: Create Forgejo Release uses: https://code.forgejo.org/forgejo/release-action@v1 with: