Skip to content

Workflow file for this run

name: Build MyPlugin
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install Haxe 4.3.6
shell: powershell
run: |
Start-Process -FilePath "install/haxe-4.3.6-win64.exe" -ArgumentList "/S" -Wait # Silent install
- name: Check Haxe Installation
shell: powershell
run: |
if (!(Test-Path -Path "C:\HaxeToolkit\haxe\")) {
Write-Error "Haxe installation directory not found!"
exit 1
} else {
Write-Host "Haxe installation directory found."
}
- name: Setup Haxelib
shell: powershell
run: |
Start-Process powershell -Verb RunAs -ArgumentList '-Command "& "C:\HaxeToolkit\haxe\haxelib.exe" setup "C:\HaxeToolkit\haxe\lib\""'
- name: Run Haxe build
shell: powershell
run: |
& "C:\HaxeToolkit\haxe\haxe.exe" build.hxml
- name: Install CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: 'latest'
architecture: x64
- name: Create Build Directory
run: mkdir build
- name: Configure CMake
shell: powershell
working-directory: build
run: cmake .. -A x64 -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 17 2022"
- name: Build Project
shell: powershell
working-directory: build
run: cmake --build . --config Release
- name: Upload Release Artifact
uses: actions/upload-artifact@v3
with:
name: MyPlugin
path: build/Release/MyPlugin.exe
- name: Release
if: startsWith(github.ref, 'refs/tags/') # Only run on tag releases
uses: softprops/action-gh-release@v1
with:
files: build/Release/MyPlugin.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}