Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

TEST

TEST #26

Workflow file for this run

name: Build and Notify

Check failure on line 1 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main.yml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: confirm
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
confirm:
description: "Confirm to proceed with the build?"
required: true
default: false
type: boolean
includeMobile:
description: "Include Android and iOS builds?"
required: false
default: "false"
env:
ARGS: "-D officialBuild -D NotDeveloper"
HAXE_VERSION: 4.3.6
jobs:
confirm:
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.confirm == 'true' }}
name: Confirm Build
runs-on: ubuntu-latest
setup-haxe:
name: Setup and Cache Haxe Dependencies
runs-on: ubuntu-latest
needs: confirm
steps:
- uses: actions/cache@v4
with:
path: ~/.haxelib
key: ${{ runner.os }}-haxe-${{ hashFiles('**/*.hxml') }}
buildLinux:
name: Build on Linux
runs-on: ubuntu-latest
needs: setup-haxe
steps:
- uses: actions/checkout@v4.1.7
- uses: krdlab/setup-haxe@master
with:
haxe-version: ${{ env.HAXE_VERSION }}
- 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
- run: echo "${{ github.run_id }}" > VERSION
- run: haxelib run lime build Project.xml linux --app-version="4.0.0-${{ github.run_id }}" $ARGS
- uses: actions/upload-artifact@v4
with:
name: Linux Build
path: export/release/linux/bin/**/*
buildWindows:
name: Build on Windows (64 & 32)
runs-on: windows-latest
needs: setup-haxe
strategy:
matrix:
arch: [64, 32]
steps:
- uses: actions/checkout@v4.1.7
- uses: krdlab/setup-haxe@master
with:
haxe-version: ${{ env.HAXE_VERSION }}
- run: |
haxelib setup C:/haxelib
haxelib install hxcpp --quiet
setup\windows.bat
shell: cmd
- run: echo "${{ github.run_id }}" > VERSION
shell: bash
- run: |
haxelib run lime build windows${{ matrix.arch == 32 && ' -32' || '' }} --app-version="4.0.0-${{ github.run_id }}" $ARGS
- uses: actions/upload-artifact@v4
with:
name: Windows Build (x${{ matrix.arch }})
path: export/release/windows${{ matrix.arch }}/bin/**/*
buildMac:
name: Build on macOS (Universal)
runs-on: macos-13
needs: setup-haxe
steps:
- uses: actions/checkout@v4.1.7
- uses: krdlab/setup-haxe@master
with:
haxe-version: ${{ env.HAXE_VERSION }}
- 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
- run: echo "${{ github.run_id }}" > VERSION
- run: haxelib run lime build mac --app-version="4.0.0-${{ github.run_id }}" $ARGS
- uses: actions/upload-artifact@v4
with:
name: macOS Build
path: export/release/mac/bin/**/*
buildAndroid:
name: Build Android
runs-on: ubuntu-latest
needs: setup-haxe
if: ${{ github.event.inputs.includeMobile == 'true' }}
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: krdlab/setup-haxe@master
with:
haxe-version: ${{ env.HAXE_VERSION }}
- uses: android-actions/setup-android@v3
- run: |
haxelib setup ~/haxelib
haxelib install hxcpp --quiet
haxelib install lime --quiet
haxelib install openfl --quiet
chmod +x ./setup/unix.sh
./setup/unix.sh
- run: echo "${{ github.run_id }}" > VERSION
- run: |
lime setup android
haxelib run lime build android --app-version="4.0.0-${{ github.run_id }}" $ARGS
- uses: actions/upload-artifact@v4
with:
name: Android Build
path: export/release/android/bin/**/*
buildiOS:
name: Build iOS
runs-on: macos-13
needs: setup-haxe
if: ${{ github.event.inputs.includeMobile == 'true' }}
steps:
- uses: actions/checkout@v4.1.7
- uses: krdlab/setup-haxe@master
with:
haxe-version: ${{ env.HAXE_VERSION }}
- run: |
haxelib setup ~/haxelib
haxelib install hxcpp --quiet
haxelib install lime --quiet
haxelib install openfl --quiet
chmod +x ./setup/unix.sh
./setup/unix.sh
- run: echo "${{ github.run_id }}" > VERSION
- run: haxelib run lime build ios --app-version="4.0.0-${{ github.run_id }}" $ARGS
- uses: actions/upload-artifact@v4
with:
name: iOS Build
path: export/release/ios/bin/**/*
notifyDiscord:
name: 📣 Notify Discord
runs-on: ubuntu-latest
if: always()
needs:
- buildLinux
- buildWindows
- buildMac
- 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 }}
COMMIT_URL: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
REPO_URL: https://github.com/${{ github.repository }}
BRANCH: ${{ github.ref_name }}
run: |
check() { [[ "$1" == "success" ]] && echo "✅" || echo "❎"; }
TITLE="✅ Build Successful"
COLOR=65280
for status in "${{ needs.buildLinux.result }}" "${{ needs.buildWindows.result }}" "${{ needs.buildMac.result }}" "${{ needs.buildAndroid.result }}" "${{ needs.buildiOS.result }}"; do
[[ "$status" != "success" && "$status" != "skipped" ]] && 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\", \"value\": \"$(check ${{ needs.buildWindows.result }})\", \"inline\": true },
{ \"name\": \"macOS\", \"value\": \"$(check ${{ needs.buildMac.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