File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 1- name : Unity Build
2-
3- on :
4- workflow_dispatch : # run manually for now
5-
61jobs :
72 build :
83 runs-on : ubuntu-latest
94 steps :
10- - name : Checkout repository
5+ - name : Checkout
116 uses : actions/checkout@v4
127
13- # 🔹 Activates Unity Personal using your Unity ID credentials
8+ - name : Read Unity Version
9+ id : unityVersion
10+ run : |
11+ version=$(grep "m_EditorVersion:" ProjectSettings/ProjectVersion.txt | awk '{print $2}')
12+ echo "unityVersion=$version" >> $GITHUB_OUTPUT
13+
1414 - name : Activate Unity
1515 uses : game-ci/unity-activate@v2
1616 with :
17- unityVersion : 2022.3.18f1
17+ unityVersion : ${{ steps.unityVersion.outputs.unityVersion }}
1818 env :
1919 UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
2020 UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
2121
22- # 🔹 Build for Windows (change platform if needed)
2322 - name : Build project
2423 uses : game-ci/unity-builder@v4
2524 with :
26- unityVersion : 2022.3.18f1
25+ unityVersion : ${{ steps.unityVersion.outputs.unityVersion }}
2726 targetPlatform : StandaloneWindows64
2827
2928 - name : Upload build
Original file line number Diff line number Diff line change 66[Ll ]ogs /
77MemoryCaptures /
88UserSettings /
9+
10+ # Ignore ProjectSettings, but keep version file for CI/CD
11+ ProjectSettings /*
12+ ! ProjectSettings /ProjectVersion.txt
You can’t perform that action at this time.
0 commit comments