name: Windows Build on: workflow_dispatch: workflow_call: jobs: windows-build: runs-on: windows steps: - name: Checkout repository uses: actions/checkout@v3 with: lfs: true fetch-depth: 0 - name: Setup environment run: | # Set environment variables for Unreal Engine echo "UE_ROOT=E:/Games/UE_5.5" >> $GITHUB_ENV # Create directories for builds if (!(Test-Path "Builds/Windows")) { New-Item -ItemType Directory -Path "Builds/Windows" -Force } if (!(Test-Path "PackagedReleases")) { New-Item -ItemType Directory -Path "PackagedReleases" -Force } - name: Build for Windows run: | # Chmod command doesn't exist in Windows, use PowerShell to run the bash script & 'C:\Program Files\Git\bin\bash.exe' -c "./scripts/win_build.sh" - name: Package Windows build run: | echo "Packaging Windows build..." if [ -d "Builds/Windows" ]; then cd Builds/Windows zip -r ../../PackagedReleases/LuckyRobots-Windows.zip . cd ../.. fi echo "=== Packaged Windows release ===" ls -la PackagedReleases/ - name: Upload Windows Build Artifact uses: actions/upload-artifact@v3 if: success() && hashFiles('PackagedReleases/LuckyRobots-Windows.zip') != '' with: name: LuckyRobots-Windows path: PackagedReleases/LuckyRobots-Windows.zip retention-days: 365