Skip to content

Release 2.0.2

Release 2.0.2 #125

name: Build Infinity Arcade Executable
on:
push:
branches: [ main, develop ]
paths:
- '**'
- '.github/workflows/build-arcade-exe.yml'
pull_request:
branches: [ main ]
paths:
- '**'
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Version to build (e.g., 0.1.0)'
required: false
default: '0.1.0'
jobs:
build-executable:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Cache Python dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install pyinstaller
- name: Build executable with PyInstaller
run: |
python -m PyInstaller infinity_arcade.spec
shell: pwsh
- name: Verify build outputs
run: |
if (-not (Test-Path "dist\InfinityArcade.exe")) {
Write-Error "Executable not found"
exit 1
}
# Show file information
$exe = Get-Item "dist\InfinityArcade.exe"
Write-Host "Build artifact:"
Write-Host " - Executable: $($exe.Name) ($([math]::Round($exe.Length / 1MB, 2)) MB)"
Write-Host " - Location: $($exe.FullName)"
shell: pwsh
- name: Upload executable artifact
uses: actions/upload-artifact@v4
with:
name: infinity-arcade-exe
path: dist/InfinityArcade.exe
retention-days: 30
- name: Upload to release (if release)
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/InfinityArcade.exe
asset_name: InfinityArcade.exe
asset_content_type: application/octet-stream