Skip to content

Commit 2047e2a

Browse files
fdf
1 parent db3b702 commit 2047e2a

File tree

2 files changed

+19
-28
lines changed

2 files changed

+19
-28
lines changed

.github/workflows/unity-build.yml

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,25 @@
1-
# File: .github/workflows/unity-build.yml
2-
1+
# A workflow to automatically build your Unity project
32
name: Unity Build
43

4+
# Controls when the action will run
55
on:
6+
# Triggers the workflow on push events for the "main" branch
67
push:
78
branches: [ "main" ]
9+
10+
# Triggers the workflow on pull requests targeting the "main" branch
811
pull_request:
912
branches: [ "main" ]
13+
14+
# Allows you to run this workflow manually from the Actions tab
1015
workflow_dispatch:
1116

1217
jobs:
1318
build:
19+
# The type of runner that the job will run on
1420
runs-on: ubuntu-latest
1521

1622
steps:
17-
18-
19-
20-
# ADD THIS DEBUGGING STEP
21-
- name: 🤫 Check if Secret is Loaded
22-
run: |
23-
if [ -z "${{ secrets.UNITY_LICENSE }}" ]; then
24-
echo "❌ ERROR: UNITY_LICENSE secret is NOT set or is empty!"
25-
exit 1
26-
else
27-
echo "✅ SUCCESS: UNITY_LICENSE secret is loaded."
28-
fi
29-
30-
31-
3223
# 1. Checkout the repository to the runner
3324
- name: Checkout project
3425
uses: actions/checkout@v4
@@ -44,19 +35,19 @@ jobs:
4435
- name: Unity - Build
4536
uses: game-ci/unity-builder@v4
4637
env:
47-
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
38+
# Your Unity credentials for a fresh activation on the runner
39+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
40+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
4841
with:
49-
targetPlatform: WebGL # Or your desired platform
50-
# ... other options
42+
# The Unity version to use for the build
43+
unityVersion: ${{ steps.get-unity-version.outputs.version }}
44+
45+
# The platform to build for (WebGL for web builds)
46+
targetPlatform: WebGL
5147

5248
# 4. (Optional) Upload the build artifact so you can download it
5349
- name: Upload Build Artifact
5450
uses: actions/upload-artifact@v4
5551
with:
56-
# Updated artifact name for the web build
5752
name: build-WebGL
58-
# Updated path to the WebGL build folder
59-
path: build/WebGL
60-
61-
62-
53+
path: build/WebGL

ProjectSettings/EditorBuildSettings.asset

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ EditorBuildSettings:
66
serializedVersion: 2
77
m_Scenes:
88
- enabled: 1
9-
path: Assets/Scenes/SampleScene.unity
10-
guid: 99c9720ab356a0642a771bea13969a05
9+
path: Assets/Scenes/HexagonTunnel.unity
10+
guid: 19900ddf9a228ba4a8fac64e0e3b71de
1111
m_configObjects:
1212
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
1313
m_UseUCBPForAssetBundles: 0

0 commit comments

Comments
 (0)