This repository was archived by the owner on Dec 19, 2025. It is now read-only.
Refactor build scripts for improved dependency installation; remove r⦠#14
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
| name: Build and Notify | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| env: | |
| Args: "-D officialBuild -D NotDeveloper" | |
| jobs: | |
| setup-haxe: | |
| name: Setup and Cache Haxe Dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.haxelib | |
| key: ${{ runner.os }}-haxe-${{ hashFiles('**/*.hxml') }} | |
| buildLinux: | |
| name: π§ Linux (64-bit) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: krdlab/setup-haxe@master | |
| with: | |
| haxe-version: 4.3.6 | |
| - 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 | |
| echo "${{ github.run_id }}" > VERSION | |
| haxelib run lime build linux --app-version="4.0.0-${{ github.run_id }}" $Args | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: linuxBuild | |
| path: export/release/linux/bin | |
| buildWindows64: | |
| name: πͺ Windows (64-bit) | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: krdlab/setup-haxe@master | |
| with: | |
| haxe-version: 4.3.6 | |
| - run: | | |
| haxelib setup C:/haxelib | |
| haxelib install hxcpp --quiet | |
| setup\windows.bat | |
| echo "${{ github.run_id }}" > VERSION | |
| haxelib run lime build windows --app-version="4.0.0-${{ github.run_id }}" $Args | |
| shell: cmd | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: windowsBuild64 | |
| path: export/release/windows/bin | |
| buildWindows32: | |
| name: πͺ Windows (32-bit) | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: krdlab/setup-haxe@master | |
| with: | |
| haxe-version: 4.3.6 | |
| - run: | | |
| haxelib setup C:/haxelib | |
| haxelib install hxcpp --quiet | |
| setup\windows.bat | |
| echo "${{ github.run_id }}" > VERSION | |
| haxelib run lime build windows -32 --app-version="4.0.0-${{ github.run_id }}" $Args | |
| shell: cmd | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: windowsBuild32 | |
| path: export/release/windows/bin | |
| buildMac: | |
| name: π macOS (Universal) | |
| runs-on: macos-13 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: krdlab/setup-haxe@master | |
| with: | |
| haxe-version: 4.3.6 | |
| - 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 | |
| echo "${{ github.run_id }}" > VERSION | |
| haxelib run lime build mac --app-version="4.0.0-${{ github.run_id }}" $Args | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: macBuild | |
| path: export/release/macos/bin | |
| buildWeb: | |
| name: π Web (HTML5) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: krdlab/setup-haxe@master | |
| with: | |
| haxe-version: 4.3.6 | |
| - run: | | |
| haxelib setup ~/haxelib | |
| haxelib install lime --quiet | |
| haxelib install openfl --quiet | |
| chmod +x ./setup/unix.sh | |
| ./setup/unix.sh | |
| echo "${{ github.run_id }}" > VERSION | |
| haxelib run lime build html5 --app-version="4.0.0-${{ github.run_id }}" $Args | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: webBuild | |
| path: export/release/html5/bin | |
| buildAndroid: | |
| name: π€ Android | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: krdlab/setup-haxe@master | |
| with: | |
| haxe-version: 4.3.6 | |
| - run: | | |
| haxelib setup ~/haxelib | |
| haxelib install lime --quiet | |
| haxelib install openfl --quiet | |
| chmod +x ./setup/unix.sh | |
| ./setup/unix.sh | |
| echo "${{ github.run_id }}" > VERSION | |
| haxelib run lime build android --app-version="4.0.0-${{ github.run_id }}" $Args | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: androidBuild | |
| path: export/release/android/bin | |
| buildiOS: | |
| name: π iOS | |
| runs-on: macos-13 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: krdlab/setup-haxe@master | |
| with: | |
| haxe-version: 4.3.6 | |
| - run: | | |
| haxelib setup ~/haxelib | |
| haxelib install lime --quiet | |
| haxelib install openfl --quiet | |
| chmod +x ./setup/unix.sh | |
| ./setup/unix.sh | |
| echo "${{ github.run_id }}" > VERSION | |
| haxelib run lime build ios --app-version="4.0.0-${{ github.run_id }}" $Args | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: iosBuild | |
| path: export/release/ios/bin | |
| notifyDiscord: | |
| name: π£ Notify Discord | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: | |
| - buildLinux | |
| - buildWindows64 | |
| - buildWindows32 | |
| - buildMac | |
| - buildWeb | |
| - buildAndroid | |
| - buildiOS | |
| steps: | |
| - name: Send Notification | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
| RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| run: | | |
| check() { [[ "$1" == "success" ]] && echo "β " || echo "β"; } | |
| TITLE="β Build Successful" | |
| COLOR=65280 | |
| for status in "${{ needs.buildLinux.result }}" "${{ needs.buildWindows64.result }}" "${{ needs.buildWindows32.result }}" "${{ needs.buildMac.result }}" "${{ needs.buildWeb.result }}" "${{ needs.buildAndroid.result }}" "${{ needs.buildiOS.result }}"; do | |
| [[ "$status" != "success" ]] && TITLE="β Build Failed" && COLOR=16711680 && break | |
| done | |
| curl -H "Content-Type: application/json" -X POST -d "{ | |
| \"username\": \"Github Action Report\", | |
| \"embeds\": [{ | |
| \"title\": \"$TITLE\", | |
| \"color\": $COLOR, | |
| \"fields\": [ | |
| { \"name\": \"Linux\", \"value\": \"$(check ${{ needs.buildLinux.result }})\", \"inline\": true }, | |
| { \"name\": \"Windows 64-bit\", \"value\": \"$(check ${{ needs.buildWindows64.result }})\", \"inline\": true }, | |
| { \"name\": \"Windows 32-bit\", \"value\": \"$(check ${{ needs.buildWindows32.result }})\", \"inline\": true }, | |
| { \"name\": \"macOS\", \"value\": \"$(check ${{ needs.buildMac.result }})\", \"inline\": true }, | |
| { \"name\": \"Web\", \"value\": \"$(check ${{ needs.buildWeb.result }})\", \"inline\": true }, | |
| { \"name\": \"Android\", \"value\": \"$(check ${{ needs.buildAndroid.result }})\", \"inline\": true }, | |
| { \"name\": \"iOS\", \"value\": \"$(check ${{ needs.buildiOS.result }})\", \"inline\": true }, | |
| { \"name\": \"Workflow Run\", \"value\": \"[View Run]($RUN_URL)\" } | |
| ], | |
| \"footer\": { \"text\": \"GitHub Actions β’ ${{ github.repository }}\" }, | |
| \"timestamp\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" | |
| }] | |
| }" $DISCORD_WEBHOOK |