79 lines
2.2 KiB
YAML
79 lines
2.2 KiB
YAML
name: Build Windows EXE
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'feature/client-tweaks'
|
|
tags:
|
|
- 'v*'
|
|
pull_request:
|
|
branches:
|
|
- 'feature/client-tweaks'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: modernization-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-2025
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11.9'
|
|
|
|
- name: Install pinned build toolchain
|
|
run: python -m pip install --disable-pip-version-check -r requirements-build.txt
|
|
|
|
- name: Verify build toolchain
|
|
run: |
|
|
python --version
|
|
pyinstaller --version
|
|
python -m pip show pyinstaller pyinstaller-hooks-contrib
|
|
|
|
- name: Syntax check
|
|
run: python -m py_compile setup_tool.py setup_tool_dynamic.py remote_packages.py tests/test_safety.py
|
|
|
|
- name: Unit safety tests
|
|
run: python -m unittest discover -s tests -v
|
|
|
|
- name: Build EXE
|
|
run: >
|
|
pyinstaller
|
|
--noconsole
|
|
--onefile
|
|
--icon=PurpleWowLogo.ico
|
|
--add-data "PurpleWowLogo.ico;."
|
|
--add-data "Payload;Payload"
|
|
--add-data "vanilla-tweaks.exe;."
|
|
--name "WoW_Modernization_Tool"
|
|
setup_tool_dynamic.py
|
|
|
|
- name: Verify EXE exists
|
|
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: Upload test artifact
|
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: WoW_Modernization_Tool-test
|
|
path: dist/WoW_Modernization_Tool.exe
|
|
if-no-files-found: error
|
|
|
|
- name: Create GitHub Release
|
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: dist/WoW_Modernization_Tool.exe
|
|
name: "WoW Modernization Tool ${{ github.ref_name }}"
|
|
body: "Release automatique générée par GitHub Actions."
|