-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.41 KB
/
build-unity.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
name: Unity Build [Windows64]
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build Unity Project
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Unity
run: |
sudo apt-get update
sudo apt-get install -y lib32gcc-s1 lib32stdc++6
wget https://download.unity3d.com/download_unity/eff2de9070d8/LinuxEditorInstaller/Unity-2022.3.14f1.tar.xz
sudo mkdir -p /opt/Unity
sudo tar -xf Unity-2022.3.14f1.tar.xz -C /opt/Unity --strip-components=1
- name: Verify Unity Installation Directory
run: |
echo "Unity installed at:"
find /opt/Unity -type f -name "Unity" -exec echo {} \;
- name: Run Unity Build
run: |
UNITY_EXECUTABLE=$(find /opt/Unity -type f -name "Unity")
if [ -z "$UNITY_EXECUTABLE" ]; then
echo "Unity executable not found."
exit 1
fi
echo "Using Unity executable at $UNITY_EXECUTABLE"
$UNITY_EXECUTABLE \
-batchmode \
-nographics \
-quit \
-projectPath . \
-buildTarget StandaloneWindows64 \
-buildOutput build/PacoMonkeyBuild.exe
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: PacoMonkey-Build
path: build/