Author SHA1 Message Date
Dusk 425412dcbb Actualiser .github/workflows/build.yml
Build Windows EXE / build (push) Has been cancelled
2026-09-12 07:54:12 +00:00
Dusk-92 2d4126ad5e Reduce CI build and artifact usage
Build Windows EXE / build (push) Has been cancelled
Run validation-only checks on direct test-branch pushes, keep full Windows builds for PRs, main, tags and manual runs, and store Actions artifacts only for explicit manual builds with 7-day retention. Release publishing remains unchanged.
2026-09-08 10:12:07 +02:00
+15 -6
View File
@@ -4,8 +4,7 @@ on:
push: push:
branches: branches:
- 'main' - 'main'
- 'feature/client-tweaks' - 'test/**'
- 'test/discord-presence'
tags: tags:
- 'v*' - 'v*'
pull_request: pull_request:
@@ -17,12 +16,12 @@ permissions:
contents: write contents: write
concurrency: concurrency:
group: modernization-${{ github.workflow }}-${{ github.ref }} group: modernization-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
build: build:
runs-on: windows-2025 runs-on: windows-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
@@ -42,12 +41,16 @@ jobs:
pyinstaller --version pyinstaller --version
python -m pip show pyinstaller pyinstaller-hooks-contrib python -m pip show pyinstaller pyinstaller-hooks-contrib
# Direct pushes to test/** run validation only. PRs, main, tags and
# explicit manual runs still validate a real Windows build.
- name: Configure x86 MSVC - name: Configure x86 MSVC
if: ${{ github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
uses: ilammy/msvc-dev-cmd@v1 uses: ilammy/msvc-dev-cmd@v1
with: with:
arch: x86 arch: x86
- name: Prepare bundled remote fallbacks - name: Prepare bundled remote fallbacks
if: ${{ github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
run: python scripts/prepare_remote_fallbacks.py run: python scripts/prepare_remote_fallbacks.py
- name: Syntax check - name: Syntax check
@@ -57,6 +60,7 @@ jobs:
run: python -m unittest discover -s tests -v run: python -m unittest discover -s tests -v
- name: Build EXE - name: Build EXE
if: ${{ github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
run: > run: >
pyinstaller pyinstaller
--noconsole --noconsole
@@ -69,12 +73,14 @@ jobs:
setup_tool_responsive.py setup_tool_responsive.py
- name: Verify EXE exists - name: Verify EXE exists
if: ${{ github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
shell: pwsh shell: pwsh
run: | run: |
if (-not (Test-Path "dist/WoW_Modernization_Tool.exe")) { throw "Build output missing" } if (-not (Test-Path "dist/WoW_Modernization_Tool.exe")) { throw "Build output missing" }
Get-Item "dist/WoW_Modernization_Tool.exe" | Format-List Name,Length,LastWriteTime Get-Item "dist/WoW_Modernization_Tool.exe" | Format-List Name,Length,LastWriteTime
- name: Create ZIP package - name: Create ZIP package
if: ${{ github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
shell: pwsh shell: pwsh
run: | run: |
$zip = "dist/WoW_Modernization_Tool.zip" $zip = "dist/WoW_Modernization_Tool.zip"
@@ -83,8 +89,10 @@ jobs:
if (-not (Test-Path $zip)) { throw "ZIP package missing" } if (-not (Test-Path $zip)) { throw "ZIP package missing" }
Get-Item $zip | Format-List Name,Length,LastWriteTime Get-Item $zip | Format-List Name,Length,LastWriteTime
- name: Upload test artifact # Ephemeral Actions artifacts are created only when explicitly requested.
if: ${{ !startsWith(github.ref, 'refs/tags/') && !(github.ref == 'refs/heads/main' && github.event.head_commit.message == 'release v2.3') }} # Release tags publish their EXE/ZIP directly as GitHub Release assets.
- name: Upload manual test artifact
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: WoW_Modernization_Tool-test name: WoW_Modernization_Tool-test
@@ -92,6 +100,7 @@ jobs:
dist/WoW_Modernization_Tool.exe dist/WoW_Modernization_Tool.exe
dist/WoW_Modernization_Tool.zip dist/WoW_Modernization_Tool.zip
if-no-files-found: error if-no-files-found: error
retention-days: 7
# One-time production promotion for v2.3. The exact commit message keeps # One-time production promotion for v2.3. The exact commit message keeps
# normal main pushes from publishing or modifying the v2.3 release. # normal main pushes from publishing or modifying the v2.3 release.