From e838d25c44d3fe745afec98b35f354c3cffa27a3 Mon Sep 17 00:00:00 2001 From: Quality App Developer Date: Thu, 5 Feb 2026 14:33:45 +0200 Subject: [PATCH] Major optimization: use --onedir (faster), add pip cache, increase timeout to 45min --- .github/workflows/build-windows.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index e2013fc..85e4b00 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -9,7 +9,7 @@ on: jobs: build-windows: runs-on: windows-latest - timeout-minutes: 30 + timeout-minutes: 45 strategy: matrix: @@ -22,23 +22,28 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + cache: 'pip' - name: Install dependencies run: | python -m pip install --upgrade pip setuptools wheel - pip install python-barcode pillow reportlab - pip install kivy==2.2.1 - pip install pyinstaller==6.1.0 + pip install python-barcode pillow reportlab kivy==2.2.1 pyinstaller==6.1.0 - name: Build executable with PyInstaller run: | - pyinstaller label_printer_gui.py --onefile --windowed --name=LabelPrinter --distpath=./dist --workpath=./build --hidden-import=kivy --hidden-import=PIL --hidden-import=barcode --hidden-import=reportlab --hidden-import=print_label --hidden-import=print_label_pdf -y + pyinstaller label_printer_gui.py --onedir --windowed --name=LabelPrinter --distpath=./dist --workpath=./build --hidden-import=kivy --hidden-import=PIL --hidden-import=barcode --hidden-import=reportlab --hidden-import=print_label --hidden-import=print_label_pdf -y --noupx + + - name: Create single executable zip + run: | + cd dist + 7z a -r LabelPrinter.zip LabelPrinter/ + shell: powershell - name: Upload Windows executable as artifact uses: actions/upload-artifact@v4 with: name: LabelPrinter-Windows - path: dist/LabelPrinter.exe + path: dist/LabelPrinter.zip retention-days: 30 - name: Create Release and Upload