From 2b9653249990b7bb298ba8bb4ba547729896a87c Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 1 Oct 2025 00:49:23 +0100 Subject: [PATCH 1/9] Add Windows build and Pyright CI job --- .github/workflows/windows-build.yml | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/windows-build.yml diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml new file mode 100644 index 0000000..591b2dd --- /dev/null +++ b/.github/workflows/windows-build.yml @@ -0,0 +1,35 @@ +name: Windows Build & Pyright Check + +on: + pull_request: + branches: + - main + paths: + - '**/*.py' + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + + - name: Install pyright + run: npm install -g pyright + + - name: Run Pyright type check + run: pyright **/*.py + + - name: Build Windows executables + run: win-build.cmd + + - name: Upload build artifacts for debugging + uses: actions/upload-artifact@v3 + with: + name: windows-executables + path: | + *.exe From 459522c658c6f109214be117ec7ec00ea37bb3e0 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 1 Oct 2025 00:50:20 +0100 Subject: [PATCH 2/9] Remove push and add path only for .py files --- .github/workflows/python-lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-lint.yml b/.github/workflows/python-lint.yml index cadaceb..f484a9b 100644 --- a/.github/workflows/python-lint.yml +++ b/.github/workflows/python-lint.yml @@ -1,8 +1,9 @@ name: Python Lint on: - push: pull_request: + paths: + - '**/*.py' jobs: pyright: From 87a3429eb1af9d10e0b79fbe536f8b2f3d669755 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 1 Oct 2025 00:53:24 +0100 Subject: [PATCH 3/9] Triggering the CI --- gettools.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gettools.py b/gettools.py index db4b0e9..1c1e997 100644 --- a/gettools.py +++ b/gettools.py @@ -23,6 +23,7 @@ THE SOFTWARE. """ + from __future__ import print_function import os import sys From e8d2fc7303d7ae8e15db643cf5ab0b0f6d663002 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 1 Oct 2025 00:55:44 +0100 Subject: [PATCH 4/9] Upgrade artifact --- .github/workflows/windows-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 591b2dd..4f867ad 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -28,7 +28,7 @@ jobs: run: win-build.cmd - name: Upload build artifacts for debugging - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: windows-executables path: | From 35a73f6fffb5c08751c8739ba1e5fbcb7d512d49 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 1 Oct 2025 09:59:27 +0100 Subject: [PATCH 5/9] Fix build command --- .github/workflows/windows-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 4f867ad..eb4cbc5 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -25,7 +25,7 @@ jobs: run: pyright **/*.py - name: Build Windows executables - run: win-build.cmd + run: ./win-build.cmd - name: Upload build artifacts for debugging uses: actions/upload-artifact@v4 From 1498bed40599130ceec735fa75828d5b6673eadb Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 1 Oct 2025 10:48:03 +0100 Subject: [PATCH 6/9] Add run for PyInstaller --- .github/workflows/python-lint.yml | 4 ++-- .github/workflows/release.yml | 2 +- .github/workflows/windows-build.yml | 15 +++++++++++++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-lint.yml b/.github/workflows/python-lint.yml index f484a9b..fcb2c1f 100644 --- a/.github/workflows/python-lint.yml +++ b/.github/workflows/python-lint.yml @@ -10,10 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v5 - name: Set up Node.js (for pyright) - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version: 20 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a93c4f2..0057f7e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - name: Run packaging script run: bash ./package.sh diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index eb4cbc5..f34350f 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -13,10 +13,16 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v5 + + - name: Set up Node.js (for pyright) + uses: actions/setup-node@v5 + with: + # use the latest Node.js available on the runner/tool-cache + node-version: 'latest' - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 - name: Install pyright run: npm install -g pyright @@ -24,6 +30,11 @@ jobs: - name: Run Pyright type check run: pyright **/*.py + - name: Install PyInstaller (latest) + run: | + python -m pip install --upgrade pip + pip install pyinstaller + - name: Build Windows executables run: ./win-build.cmd From 41086f3f2a8fb29f6e479ba6f82f2adfab1f3d50 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 1 Oct 2025 11:47:17 +0100 Subject: [PATCH 7/9] Add latest python version --- .github/workflows/windows-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index f34350f..2b94aea 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -23,6 +23,8 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 + with: + python-version: 'latest' - name: Install pyright run: npm install -g pyright From 6ba02d3f0e4bc52bb6541145bfc62c6e38024c6c Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 1 Oct 2025 11:54:12 +0100 Subject: [PATCH 8/9] Replace with 3.x python version --- .github/workflows/windows-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 2b94aea..5ed8c24 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -24,7 +24,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 'latest' + python-version: '3.x' - name: Install pyright run: npm install -g pyright From 64ee45cc3a42bb44243f7ddb15d87b6327181162 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 1 Oct 2025 12:43:48 +0100 Subject: [PATCH 9/9] Add Windows commit artifacts CI on merge if available --- .../workflows/windows-commit-artifacts.yml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/windows-commit-artifacts.yml diff --git a/.github/workflows/windows-commit-artifacts.yml b/.github/workflows/windows-commit-artifacts.yml new file mode 100644 index 0000000..07f9edb --- /dev/null +++ b/.github/workflows/windows-commit-artifacts.yml @@ -0,0 +1,45 @@ +name: Commit Windows executables on merge + +on: + workflow_run: + workflows: ["Windows Build & Pyright Check"] + types: + - completed + +jobs: + commit-executables: + if: ${{ github.event.workflow_run.conclusion == 'success' }} + runs-on: ubuntu-latest + + steps: + - name: Checkout main branch + uses: actions/checkout@v5 + with: + ref: main + + - name: Try to download artifact + id: download + uses: actions/download-artifact@v4 + with: + name: windows-executables + path: temp_exe + continue-on-error: true + + - name: Check if artifact exists + run: | + if [ ! -d "temp_exe" ] || [ -z "$(ls -A temp_exe)" ]; then + echo "No artifact found. Exiting workflow." + exit 0 + fi + + - name: Copy executables to repo root + run: | + cp temp_exe/*.exe ./ + + - name: Commit and push updated .exe files + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add *.exe + git diff --quiet && echo "No changes to commit" || git commit -m "Update Windows executables from latest merged PR" + git push origin main