Skip to content

Commit 64fc38f

Browse files
jdlkfj
1 parent 70614e8 commit 64fc38f

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

.github/workflows/unity-build.yml

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
1+
name: Unity Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
19
jobs:
210
build:
11+
name: Build project
312
runs-on: ubuntu-latest
13+
414
steps:
5-
- name: Checkout
15+
- name: Checkout repository
616
uses: actions/checkout@v4
717

8-
- name: Read Unity Version
9-
id: unityVersion
18+
- name: Get Unity Version
19+
id: get-unity-version
1020
run: |
11-
version=$(grep "m_EditorVersion:" ProjectSettings/ProjectVersion.txt | awk '{print $2}')
12-
echo "unityVersion=$version" >> $GITHUB_OUTPUT
13-
14-
- name: Activate Unity
15-
uses: game-ci/unity-activate@v2
16-
with:
17-
unityVersion: ${{ steps.unityVersion.outputs.unityVersion }}
18-
env:
19-
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
20-
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
21+
version=$(grep m_EditorVersion ProjectSettings/ProjectVersion.txt | sed 's/m_EditorVersion: //')
22+
echo "version=$version" >> $GITHUB_OUTPUT
2123
2224
- name: Build project
2325
uses: game-ci/unity-builder@v4
2426
with:
25-
unityVersion: ${{ steps.unityVersion.outputs.unityVersion }}
26-
targetPlatform: StandaloneWindows64
27-
28-
- name: Upload build
29-
uses: actions/upload-artifact@v4
30-
with:
31-
name: GameBuild
32-
path: build
27+
unityVersion: ${{ steps.get-unity-version.outputs.version }}
28+
targetPlatform: StandaloneWindows64 # Change to WebGL, Android, iOS etc.

0 commit comments

Comments
 (0)