-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (55 loc) · 1.81 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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: |
& "C:\HaxeToolkit\haxe\haxelib.exe" setup
- 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 }}