Reduce CI build and artifact usage #16
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user