From cf006e2c3c2817054733ae60d79584c54b31019a Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Tue, 8 Sep 2026 10:09:11 +0200 Subject: [PATCH] Reduce CI build and artifact usage --- .github/workflows/build.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d3ac92..8e7b109 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,8 +4,7 @@ on: push: branches: - 'main' - - 'feature/client-tweaks' - - 'test/discord-presence' + - 'test/**' tags: - 'v*' pull_request: @@ -17,7 +16,7 @@ permissions: contents: write concurrency: - group: modernization-${{ github.workflow }}-${{ github.ref }} + group: modernization-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} cancel-in-progress: true jobs: @@ -42,12 +41,16 @@ jobs: pyinstaller --version 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 + if: ${{ github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} uses: ilammy/msvc-dev-cmd@v1 with: arch: x86 - 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 - name: Syntax check @@ -57,6 +60,7 @@ jobs: run: python -m unittest discover -s tests -v - name: Build EXE + if: ${{ github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} run: > pyinstaller --noconsole @@ -69,12 +73,14 @@ jobs: setup_tool_responsive.py - name: Verify EXE exists + if: ${{ github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} shell: pwsh run: | 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 - name: Create ZIP package + if: ${{ github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} shell: pwsh run: | $zip = "dist/WoW_Modernization_Tool.zip" @@ -83,8 +89,10 @@ jobs: if (-not (Test-Path $zip)) { throw "ZIP package missing" } Get-Item $zip | Format-List Name,Length,LastWriteTime - - name: Upload test artifact - if: ${{ !startsWith(github.ref, 'refs/tags/') && !(github.ref == 'refs/heads/main' && github.event.head_commit.message == 'release v2.3') }} + # Ephemeral Actions artifacts are created only when explicitly requested. + # 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 with: name: WoW_Modernization_Tool-test @@ -92,6 +100,7 @@ jobs: dist/WoW_Modernization_Tool.exe dist/WoW_Modernization_Tool.zip if-no-files-found: error + retention-days: 7 # One-time production promotion for v2.3. The exact commit message keeps # normal main pushes from publishing or modifying the v2.3 release. -- 2.52.0