Update .gitea/workflows/run-mucapy.yml
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
name: Build MuCaPy Executable
|
name: Build MuCaPy Executable
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -8,38 +7,37 @@ on:
|
|||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows-exe:
|
build-and-package:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install dependencies for Wine
|
- name: Set up Python 3.10
|
||||||
run: |
|
uses: actions/setup-python@v4
|
||||||
sudo dpkg --add-architecture i386
|
with:
|
||||||
sudo apt update
|
python-version: '3.10'
|
||||||
sudo apt install -y wine64 wine32 unzip wget cabextract
|
|
||||||
|
|
||||||
- name: Install Windows Python under Wine
|
- name: Install Python dependencies
|
||||||
run: |
|
run: |
|
||||||
wget https://www.python.org/ftp/python/3.13.9/python-3.13.9-amd64.exe -O python_installer.exe
|
python -m pip install --upgrade pip
|
||||||
wine python_installer.exe /quiet InstallAllUsers=1 PrependPath=1
|
pip install -r requirements.txt
|
||||||
|
|
||||||
- name: Upgrade pip and install PyInstaller (Windows)
|
- name: Install PyInstaller
|
||||||
|
run: pip install pyinstaller
|
||||||
|
|
||||||
|
- name: Build executable with PyInstaller
|
||||||
run: |
|
run: |
|
||||||
wine python -m pip install --upgrade pip
|
pyinstaller --onefile --windowed mucapy/main.py \
|
||||||
wine python -m pip install pyinstaller
|
--add-data "mucapy/styling:styling" \
|
||||||
|
--add-data "mucapy/models:models" \
|
||||||
|
--add-data "mucapy/todopackage:todopackage"
|
||||||
|
|
||||||
- name: Build Windows executable
|
- name: Upload executable artifact
|
||||||
run: |
|
|
||||||
wine 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
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: mucapy-windows-exe
|
name: mucapy-executable
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user