This repository was archived by the owner on Dec 19, 2025. It is now read-only.
POS BACKUP #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # GitHub Actions Workflow for Building Haxe Project | |
| # Now with 32-bit Windows support and fixed macOS multi-arch build | |
| name: Build | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| env: | |
| Args: "-D officialBuild -D NotDeveloper" | |
| jobs: | |
| buildLinux: | |
| name: Build on Linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4.1.7 | |
| - name: Setup Haxe | |
| uses: krdlab/setup-haxe@master | |
| with: | |
| haxe-version: 4.3.6 | |
| - name: Install Dependencies & Setup | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libvlc-dev libvlccore-dev | |
| haxelib setup ~/haxelib | |
| haxelib install hxcpp --quiet | |
| chmod +x ./setup/unix.sh | |
| ./setup/unix.sh | |
| - name: Skip SScript setup mode | |
| run: echo 'oy9:showMacroty8:loopCosti25y10:includeAllfg' >> ~/settings.cocoa | |
| - name: Create Version Tag | |
| run: echo "${{ github.run_id }}" > VERSION | |
| - name: Compile for Linux | |
| run: haxelib run lime build Project.xml linux --app-version="4.0.0-${{ github.run_id }}" $Args | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4.3.4 | |
| with: | |
| name: linuxBuild | |
| path: export/release/linux/bin | |
| buildWindows: | |
| name: Build on Windows (64-bit) | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4.1.7 | |
| - name: Setup Haxe | |
| uses: krdlab/setup-haxe@master | |
| with: | |
| haxe-version: 4.3.6 | |
| - name: Install Dependencies & Setup | |
| run: | | |
| haxelib setup C:/haxelib | |
| haxelib install hxcpp --quiet | |
| setup\windows.bat | |
| shell: cmd | |
| - name: Skip SScript setup mode | |
| run: echo 'oy9:showMacroty8:loopCosti25y10:includeAllfg' >> %USERPROFILE%\settings.cocoa | |
| shell: cmd | |
| - name: Create Version Tag | |
| run: echo "${{ github.run_id }}" > VERSION | |
| - name: Compile for Windows 64-bit | |
| run: haxelib run lime build windows --app-version="4.0.0-${{ github.run_id }}" $Args | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4.3.4 | |
| with: | |
| name: windowsBuild64 | |
| path: export/release/windows/bin | |
| buildWindows32: | |
| name: Build on Windows (32-bit) | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4.1.7 | |
| - name: Setup Haxe | |
| uses: krdlab/setup-haxe@master | |
| with: | |
| haxe-version: 4.3.6 | |
| - name: Install Dependencies & Setup | |
| run: | | |
| haxelib setup C:/haxelib | |
| haxelib install hxcpp --quiet | |
| setup\windows.bat | |
| shell: cmd | |
| - name: Skip SScript setup mode | |
| run: echo 'oy9:showMacroty8:loopCosti25y10:includeAllfg' >> %USERPROFILE%\settings.cocoa | |
| shell: cmd | |
| - name: Create Version Tag | |
| run: echo "${{ github.run_id }}" > VERSION | |
| - name: Compile for Windows 32-bit | |
| run: haxelib run lime build windows -32 --app-version="4.0.0-${{ github.run_id }}" $Args | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4.3.4 | |
| with: | |
| name: windowsBuild32 | |
| path: export/release/windows/bin | |
| buildMac: | |
| name: Build on macOS (Universal) | |
| runs-on: macos-13 | |
| steps: | |
| - uses: actions/checkout@v4.1.7 | |
| - uses: krdlab/setup-haxe@master | |
| with: | |
| haxe-version: 4.3.6 | |
| - name: Install Haxelib | |
| run: | | |
| haxelib setup ~/haxelib | |
| haxelib install hxcpp --quiet | |
| haxelib install lime --quiet | |
| haxelib run lime rebuild lime mac -64 | |
| haxelib run lime rebuild lime mac -Dmac-catalyst -Dmac-arm64 | |
| chmod +x ./setup/unix.sh | |
| ./setup/unix.sh | |
| - name: Skip SScript setup mode | |
| run: echo 'oy9:showMacroty8:loopCosti25y10:includeAllfg' >> ~/settings.cocoa | |
| - name: Create Version Tag | |
| run: echo "${{ github.run_id }}" > VERSION | |
| - name: Compile for macOS Universal | |
| run: haxelib run lime build mac --app-version="4.0.0-${{ github.run_id }}" $Args | |
| - name: Publish Artifact | |
| uses: actions/upload-artifact@v4.3.4 | |
| with: | |
| name: macBuild | |
| path: export/release/macos/bin | |
| notifyDiscord: | |
| name: π£ Notify Discord | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: [buildLinux, buildWindows, buildWindows32, buildMac] | |
| steps: | |
| - name: Send Discord Notification | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
| RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| run: | | |
| STATUS_LINUX="${{ needs.buildLinux.result }}" | |
| STATUS_WIN64="${{ needs.buildWindows.result }}" | |
| STATUS_WIN32="${{ needs.buildWindows32.result }}" | |
| STATUS_MAC="${{ needs.buildMac.result }}" | |
| msg_linux="LINUX: β Build Error" | |
| msg_win64="WIN64: β Build Error" | |
| msg_win32="WIN32: β Build Error" | |
| msg_mac="MAC: β Build Error" | |
| [[ "$STATUS_LINUX" == "success" ]] && msg_linux="LINUX: β Build Completed" | |
| [[ "$STATUS_WIN64" == "success" ]] && msg_win64="WIN64: β Build Completed" | |
| [[ "$STATUS_WIN32" == "success" ]] && msg_win32="WIN32: β Build Completed" | |
| [[ "$STATUS_MAC" == "success" ]] && msg_mac="MAC: β Build Completed" | |
| if [[ "$STATUS_LINUX" == "success" && "$STATUS_WIN64" == "success" && "$STATUS_WIN32" == "success" && "$STATUS_MAC" == "success" ]]; then | |
| TITLE="β Build Successful" | |
| COLOR=65280 | |
| else | |
| TITLE="β Build Error" | |
| COLOR=16711680 | |
| fi | |
| curl -H "Content-Type: application/json" \ | |
| -X POST \ | |
| -d "{ | |
| \"username\": \"Github Action Report\", | |
| \"embeds\": [{ | |
| \"title\": \"$TITLE\", | |
| \"description\": \"$DESCRIPTION\", | |
| \"color\": $COLOR, | |
| \"fields\": [ | |
| { \"name\": \"π Workflow Run\", \"value\": \"[View on GitHub]($RUN_URL)\" } | |
| ], | |
| \"footer\": { | |
| \"text\": \"GitHub Actions β’ ${{ github.repository }}\" | |
| }, | |
| \"timestamp\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" | |
| }] | |
| }" \ | |
| $DISCORD_WEBHOOK |