From 9fa0424a6c64fdba65a0d0eb771104c0d1260799 Mon Sep 17 00:00:00 2001 From: Pakobbix Date: Wed, 17 May 2023 00:38:30 +0200 Subject: [PATCH] fixed the ubuntu-latest are build on windows and windows-latest build on ubuntu --- .github/workflows/package.yml | 50 ++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 5a5e671..0aa8a12 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -3,23 +3,26 @@ on: push: paths: - .github/workflows/** - workflow_dispatch: + +env: + PACKAGE_VERSION: v1.4 jobs: - package: + package-self-hosted-ubuntu: runs-on: self-hosted + if: runner.os == 'Linux' strategy: matrix: - os: [windows-latest, ubuntu-latest] + python-version: [3.6, 3.7, 3.8, 3.9] steps: - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: 3.x - - name: Checkout repository uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies run: | python -m pip install --upgrade pip @@ -34,5 +37,34 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v3 with: - name: ${{ matrix.os }}-binary-v1.4 + name: linux-binary-${{ env.PACKAGE_VERSION }} + path: dist + + package-self-hosted-windows: + runs-on: self-hosted + if: runner.os == 'Windows' + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: 3.x + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install pyinstaller + + - name: Build and package + run: | + pyinstaller --noconfirm --onefile --windowed StartUI.py + copy webuiGUI.py dist\ # Copy webuiGUI.py to the dist directory + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: windows-binary-${{ env.PACKAGE_VERSION }} path: dist