-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.69 KB
/
main.yaml
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
51
52
53
54
55
56
57
58
59
60
name: Build Unity Project
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cache Library
uses: actions/cache@v3
with:
path: Library
key: Library-${{ hashFiles('**/*.cs', '**/*.shader', '**/*.prefab', '**/*.unity', '**/*.json', '**/*.txt', '**/*.xml', '**/*.png', '**/*.jpg', '**/*.mp4', '**/*.wav', '**/*.ogg') }}
restore-keys: |
Library-
- name: Checkout code
uses: actions/checkout@v2
- name: Discard uncommitted changes
run: |
git reset --hard
git clean -fd
- name: Install Butler
run: |
curl -LO https://itch.io/butler/installation/linux/butler
chmod +x butler
sudo mv butler /usr/local/bin/
- name: Set up Unity
uses: game-ci/unity-builder@v2
with:
unityVersion: 2022.3.27f1
targetPlatform: StandaloneWindows64
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
- name: Build Unity Project
run: |
unity-builder --projectPath . --buildTarget StandaloneWindows64 --buildName SubnauticaIB --outputPath ./build
- name: Zip Build Output
run: |
zip -r SubnauticaIB.zip ./build/* # Use zip command for Linux
- name: Upload to Butler
run: |
butler push SubnauticaIB.zip pyoneerc1/subnauticaib:latest --credentials ${{ secrets.BUTLER_CREDENTIALS }}
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: Build
path: ./build