From e8ea544eb1d1d8d9bc6e8083e4d14930ab39aa33 Mon Sep 17 00:00:00 2001 From: Bavo Denys <66639415+bavodenys@users.noreply.github.com> Date: Sun, 21 Jan 2024 10:09:00 +0100 Subject: [PATCH 1/2] Add a Windows build --- .github/workflows/main.yml | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6c87bfc..89eccc5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ on: - master jobs: - build: + build-linux: runs-on: ubuntu-latest steps: @@ -26,8 +26,34 @@ jobs: flet pack main.py deactivate # Deactivate the virtual environment - - name: Publish Artifact + - name: Publish Artifact for Linux uses: actions/upload-artifact@v2 with: - name: Bike maintenance tool + name: Bike maintenance tool - Linux + path: dist/main + + build-windows: + runs-on: windows-latest # Use a Windows runner for this job + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install dependencies and execute flet pack + run: | + python -m venv venv + .\venv\Scripts\Activate # Activate virtual environment on Windows + pip install -r requirements.txt # Replace with your requirements file if needed + flet pack main.py + deactivate # Deactivate the virtual environment + + - name: Publish Artifact for Windows + uses: actions/upload-artifact@v2 + with: + name: Bike maintenance tool - Windows path: dist/main From 23e37cfed6adcc530796442b929b3a6d6ffbde79 Mon Sep 17 00:00:00 2001 From: Bavo Denys <66639415+bavodenys@users.noreply.github.com> Date: Sun, 21 Jan 2024 10:23:00 +0100 Subject: [PATCH 2/2] Set correct path to publish artifact --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 89eccc5..b9a0fbd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,4 +56,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: Bike maintenance tool - Windows - path: dist/main + path: dist/main.exe