70 lines
1.9 KiB
YAML
70 lines
1.9 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-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install PyInstaller
|
|
run: pip install pyinstaller
|
|
|
|
- name: Syntax check
|
|
run: python -m py_compile setup_tool.py setup_tool_dynamic.py remote_packages.py
|
|
|
|
- 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."
|