Files
e-ink-dash/.gitea/workflows/build-exe.yml
T
Imrayya 435703ab9d
Build Server .exe / build (push) Failing after 7s
ci: install Wine directly instead of third-party action
- Replaced egor-tensin/setup-wine with manual Wine installation
- Uses WineHQ repo for winehq-stable on Ubuntu
- Should work with Gitea's action registry
2026-07-01 11:46:12 +00:00

104 lines
2.8 KiB
YAML

name: Build Server .exe
on:
push:
branches: [main]
paths:
- "server/**"
- ".gitea/workflows/build-exe.yml"
pull_request:
branches: [main]
paths:
- "server/**"
- ".gitea/workflows/build-exe.yml"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Wine
run: |
sudo dpkg --add-architecture i386
sudo mkdir -pm /etc/apt/keyrings
sudo wget -qO /etc/apt/keyrings/winehq-archive.key \
https://dl.winehq.org/wine-builds/winehq.key
sudo wget -qO /etc/apt/sources.list.d/winehq.list \
https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
sudo apt-get update
sudo apt-get install --install-recommends winehq-stable -y
- name: Set up Wine prefix
run: |
export WINEPREFIX=$HOME/wine-prefix
mkdir -p "$WINEPREFIX"
wineboot --init
- name: Download Python installer
run: |
wget -q \
https://www.python.org/ftp/python/3.12.4/python-3.12.4-amd64.exe \
-O /tmp/python.exe
- name: Install Python in Wine
run: |
export WINEPREFIX=$HOME/wine-prefix
wine /tmp/python.exe \
/quiet \
InstallAllUsers=1 \
PrependPath=1 \
Include_test=0
rm /tmp/python.exe
- name: Add Python to PATH
run: |
echo "$HOME/wine-prefix/drive_c/Python312" >> $GITHUB_PATH
echo "$HOME/wine-prefix/drive_c/Python312/Scripts" >> $GITHUB_PATH
- name: Install Python dependencies
run: |
cd server
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
cd server
pip install pytest pytest-asyncio
pytest tests/ -v
- name: Build .exe with PyInstaller
run: |
cd server
python -m PyInstaller \
tray_wrapper.py \
--name PaperDash \
--onefile \
--noconsole \
--clean
ls -la dist/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: PaperDash.exe
path: server/dist/PaperDash.exe
if-no-files-found: error
- name: Update Rolling Draft Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: true
tag: rolling-draft
name: "Draft (latest build)"
body: |
Latest PaperDash server build from commit ${{ gitea.sha }}.
Built on Linux via Wine + PyInstaller.
Edit tag, name, and notes before publishing.
artifacts: "server/dist/PaperDash.exe"