-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.2 KB
/
build-unity.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Unity Build Workflow 🔨
on:
push:
branches:
- main
pull_request: {}
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Restore Library cache
uses: actions/cache@v4
with:
path: PacoMonkey/Library
key: Library-${{ runner.os }}-${{ github.sha }}
restore-keys: |
Library-${{ runner.os }}
- name: Create Unity license file
run: |
mkdir -p $HOME/.local/share/unity3d/Unity
echo "${{ secrets.UNITY_LICENSE }}" > $HOME/.local/share/unity3d/Unity/Unity_lic.ulf
- name: Verify license file
run: cat $HOME/.local/share/unity3d/Unity/Unity_lic.ulf
- name: Activate Unity License
uses: game-ci/unity-activate@v2
with:
unityVersion: '2022.3.14f1'
- name: Build project
uses: game-ci/unity-builder@v2
with:
projectPath: PacoMonkey
targetPlatform: WebGL
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: WebGL Build
path: PacoMonkey/build/WebGL