Skip to content

Commit dc8f2da

Browse files
committed
Added build.yml
1 parent 1757f04 commit dc8f2da

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/build.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build Sentaur Survivors
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
env:
11+
UNITY_VERSION: '6000.1.12f1'
12+
13+
jobs:
14+
build:
15+
name: Build for ${{ matrix.targetPlatform }}
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
targetPlatform:
21+
# - StandaloneOSX # Build a macOS standalone (Intel 64-bit).
22+
# - StandaloneWindows64 # Build a Windows 64-bit standalone.
23+
- StandaloneLinux64 # Build a Linux 64-bit standalone.
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
lfs: true
31+
32+
- name: Cache Unity Library
33+
uses: actions/cache@v3
34+
with:
35+
path: Library
36+
key: Library-${{ matrix.targetPlatform }}-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
37+
restore-keys: |
38+
Library-${{ matrix.targetPlatform }}-
39+
Library-
40+
41+
- run: echo "::add-mask::${{ secrets.LICENSE_SERVER_URL }}"
42+
43+
- uses: game-ci/unity-builder@v4
44+
with:
45+
unityVersion: ${{ env.UNITY_VERSION }}
46+
targetPlatform: ${{ matrix.targetPlatform }}
47+
unityLicensingServer: ${{ secrets.LICENSE_SERVER_URL }}
48+
buildName: SentaurSurvivors-${{ matrix.targetPlatform }}
49+
allowDirtyBuild: true
50+
51+
- name: Upload Build Artifact
52+
uses: actions/upload-artifact@v3
53+
if: always()
54+
with:
55+
name: Build-${{ matrix.targetPlatform }}
56+
path: build
57+
retention-days: 14

0 commit comments

Comments
 (0)