From 826e545652de9515a3f52a7a7f9e5f096f82c36f Mon Sep 17 00:00:00 2001 From: rattatwinko Date: Fri, 31 Oct 2025 22:24:06 +0000 Subject: [PATCH] Update .gitea/workflows/run-mucapy.yml --- .gitea/workflows/run-mucapy.yml | 66 ++++++++++++++++----------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/.gitea/workflows/run-mucapy.yml b/.gitea/workflows/run-mucapy.yml index 0a2f035..0995af7 100644 --- a/.gitea/workflows/run-mucapy.yml +++ b/.gitea/workflows/run-mucapy.yml @@ -1,45 +1,43 @@ - name: Build MuCaPy Executable on: push: - branches: [ main ] - pull_request: - branches: [ main ] + branches: [ main ] + pull_request: + branches: [ main ] -jobs: - build-windows-exe: - runs-on: ubuntu-latest + jobs: + build-and-package: + runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 + steps: + - name: Checkout repository + uses: actions/checkout@v3 - - name: Install dependencies for Wine - run: | - sudo dpkg --add-architecture i386 - sudo apt update - sudo apt install -y wine64 wine32 unzip wget cabextract + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' - - name: Install Windows Python under Wine - run: | - wget https://www.python.org/ftp/python/3.13.9/python-3.13.9-amd64.exe -O python_installer.exe - wine python_installer.exe /quiet InstallAllUsers=1 PrependPath=1 + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt - - name: Upgrade pip and install PyInstaller (Windows) - run: | - wine python -m pip install --upgrade pip - wine python -m pip install pyinstaller + - name: Install PyInstaller + run: pip install pyinstaller - - name: Build Windows executable - run: | - wine pyinstaller --onefile --windowed mucapy/main.py \ - --add-data "mucapy/styling;styling" \ - --add-data "mucapy/models;models" \ - --add-data "mucapy/todopackage;todopackage" + - name: Build executable with PyInstaller + run: | + pyinstaller --onefile --windowed mucapy/main.py \ + --add-data "mucapy/styling:styling" \ + --add-data "mucapy/models:models" \ + --add-data "mucapy/todopackage:todopackage" - - name: Upload Windows executable - uses: actions/upload-artifact@v3 - with: - name: mucapy-windows-exe - path: dist/ + - name: Upload executable artifact + uses: actions/upload-artifact@v3 + with: + name: mucapy-executable + path: dist/ + + \ No newline at end of file