-
Notifications
You must be signed in to change notification settings - Fork 48
45 lines (36 loc) · 1.26 KB
/
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
name: Unity
on:
push:
paths: [ "Reactor.Assets/**", "Reactor/Assets/*.bundle", ".github/workflows/unity.yml" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/Unity/Hub/Editor
~/.config/unityhub
~/.local/share/unity3d/Unity/Unity_lic.ulf
key: unity-${{ hashFiles('./Reactor.Assets/ProjectSettings/ProjectVersion.txt') }}
- name: Setup Unity
uses: js6pak/setup-unity@master
with:
project-path: ./Reactor.Assets
unity-modules: windows-mono android
- name: Activate Unity
env:
UNITY_USERNAME: ${{ secrets.UNITY_USERNAME }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
run: |
/opt/unityhub/UnityLicensingClient_V1/Unity.Licensing.Client --activate-ulf --username "$UNITY_USERNAME" --password "$UNITY_PASSWORD"
- name: Build
working-directory: ./Reactor.Assets
run: bash ./build.sh
- uses: actions/upload-artifact@v4
with:
name: bundles
path: ./Reactor/Assets/*.bundle
- name: Verify
run: if [[ $(git status --porcelain) ]]; then git status; git diff; exit 1; fi