From 4903bba6c67c61f4637351b85c85ba78ed2e3113 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 1 Oct 2025 14:09:32 +0100 Subject: [PATCH 1/2] Only build Windows .exe files if any .py file changed --- .github/workflows/windows-build.yml | 33 +++++++------- .../workflows/windows-commit-artifacts.yml | 45 ------------------- 2 files changed, 17 insertions(+), 61 deletions(-) delete mode 100644 .github/workflows/windows-commit-artifacts.yml diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 5ed8c24..0b4e266 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -1,11 +1,11 @@ name: Windows Build & Pyright Check on: - pull_request: - branches: - - main - paths: - - '**/*.py' + push: + branches: + - main + paths: + - '**/*.py' # Only rebuild if Python files changed jobs: build: @@ -15,17 +15,17 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + - 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@v5 - with: - python-version: '3.x' - - name: Install pyright run: npm install -g pyright @@ -40,9 +40,10 @@ jobs: - name: Build Windows executables run: ./win-build.cmd - - name: Upload build artifacts for debugging - uses: actions/upload-artifact@v4 - with: - name: windows-executables - path: | - *.exe + - name: Commit updated .exe files to main + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add *.exe + git commit -m "Update Windows executables from latest merged PR" || echo "No changes to commit" + git push origin main \ No newline at end of file diff --git a/.github/workflows/windows-commit-artifacts.yml b/.github/workflows/windows-commit-artifacts.yml deleted file mode 100644 index 07f9edb..0000000 --- a/.github/workflows/windows-commit-artifacts.yml +++ /dev/null @@ -1,45 +0,0 @@ -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 From aeb4be0837ce101381bf6d60350ed3c6bf035e78 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 1 Oct 2025 14:13:08 +0100 Subject: [PATCH 2/2] Force triggering CI checks --- gettools.py | 1 - 1 file changed, 1 deletion(-) diff --git a/gettools.py b/gettools.py index 1c1e997..db4b0e9 100644 --- a/gettools.py +++ b/gettools.py @@ -23,7 +23,6 @@ THE SOFTWARE. """ - from __future__ import print_function import os import sys