From 2d60526889ceed430636167a1a621c5b514fbd4e Mon Sep 17 00:00:00 2001 From: Dominic Springer Date: Sun, 1 Nov 2026 09:51:09 +0100 Subject: [PATCH] Build Windows EXE on Linux with Mono --- .gitea/workflows/linux-source-checks.yaml | 31 ++++++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/linux-source-checks.yaml b/.gitea/workflows/linux-source-checks.yaml index 79b3ed0..41f5063 100644 --- a/.gitea/workflows/linux-source-checks.yaml +++ b/.gitea/workflows/linux-source-checks.yaml @@ -1,4 +1,4 @@ -name: Linux Source Checks +name: Linux Source Checks and Windows EXE Build on: push: @@ -8,14 +8,17 @@ permissions: contents: read jobs: - source-checks: + source-checks-and-build: runs-on: ubuntu-24.04 container: - image: node:20-alpine + image: node:20-bookworm-slim steps: - - name: Install Git for checkout - run: apk add --no-cache git - shell: sh + - name: Install Git and Mono compiler + run: | + apt-get update + apt-get install -y --no-install-recommends git mono-devel + rm -rf /var/lib/apt/lists/* + shell: bash - name: Check out repository uses: actions/checkout@v4 @@ -24,4 +27,18 @@ jobs: - name: Check latest commit for whitespace errors run: git show --check --oneline HEAD - shell: sh \ No newline at end of file + shell: bash + + - name: Build Windows Forms EXE with Mono + run: | + mkdir -p release + mcs -target:winexe -optimize+ -out:release/TAP-Uploader.exe -r:System.Windows.Forms.dll -r:System.Drawing.dll uploader/TapUploader.cs + test -s release/TAP-Uploader.exe + shell: bash + + - name: Upload Windows EXE artifact + uses: actions/upload-artifact@v4 + with: + name: TAP-Uploader-Windows + path: release/TAP-Uploader.exe + if-no-files-found: error