Skip to content

Commit b6f5049

Browse files
reygr
1 parent 1317165 commit b6f5049

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.github/workflows/unity-build.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,35 @@ jobs:
44
steps:
55
- uses: actions/checkout@v3
66

7+
# 1. Detect Unity version from ProjectVersion.txt
78
- name: Get Unity Version
89
id: get-unity-version
910
run: |
1011
version=$(grep "^m_EditorVersion:" ProjectSettings/ProjectVersion.txt | sed 's/m_EditorVersion: //')
1112
echo "version=$version" >> $GITHUB_OUTPUT
1213
14+
# 2. Request activation file (ONLY first time)
15+
- name: Unity - Request Activation File
16+
uses: game-ci/unity-request-activation-file@v2
17+
with:
18+
unityVersion: ${{ steps.get-unity-version.outputs.version }}
19+
20+
- name: Upload activation file
21+
uses: actions/upload-artifact@v3
22+
with:
23+
name: Unity_ActivationFile
24+
path: Unity_*.alf
25+
26+
# 3. Activate (after you’ve uploaded UNITY_LICENSE secret)
1327
- name: Unity - Activate
28+
if: env.UNITY_LICENSE != ''
1429
uses: game-ci/unity-activate@v2
1530
with:
1631
unityVersion: ${{ steps.get-unity-version.outputs.version }}
1732
env:
18-
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
19-
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
20-
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
33+
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
2134

35+
# 4. Build
2236
- name: Unity - Build
2337
uses: game-ci/unity-builder@v4
2438
with:

0 commit comments

Comments
 (0)