Skip to content

Commit d667202

Browse files
tfgh
1 parent b6f5049 commit d667202

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/unity-build.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1+
name: Unity Build
2+
3+
on:
4+
push:
5+
branches: [ "main" ] # Run on push to main
6+
pull_request:
7+
branches: [ "main" ] # Run on PRs targeting main
8+
workflow_dispatch: # Allow manual run from Actions tab
9+
110
jobs:
211
build:
312
runs-on: ubuntu-latest
413
steps:
514
- uses: actions/checkout@v3
615

7-
# 1. Detect Unity version from ProjectVersion.txt
16+
# 1. Detect Unity version
817
- name: Get Unity Version
918
id: get-unity-version
1019
run: |
1120
version=$(grep "^m_EditorVersion:" ProjectSettings/ProjectVersion.txt | sed 's/m_EditorVersion: //')
1221
echo "version=$version" >> $GITHUB_OUTPUT
1322
14-
# 2. Request activation file (ONLY first time)
23+
# 2. Request activation file (first run only)
1524
- name: Unity - Request Activation File
1625
uses: game-ci/unity-request-activation-file@v2
1726
with:
@@ -23,7 +32,7 @@ jobs:
2332
name: Unity_ActivationFile
2433
path: Unity_*.alf
2534

26-
# 3. Activate (after you’ve uploaded UNITY_LICENSE secret)
35+
# 3. Activate (after you add UNITY_LICENSE secret)
2736
- name: Unity - Activate
2837
if: env.UNITY_LICENSE != ''
2938
uses: game-ci/unity-activate@v2
@@ -37,4 +46,4 @@ jobs:
3746
uses: game-ci/unity-builder@v4
3847
with:
3948
unityVersion: ${{ steps.get-unity-version.outputs.version }}
40-
targetPlatform: Android
49+
targetPlatform: Android # Or StandaloneWindows, WebGL, etc.

0 commit comments

Comments
 (0)