Skip to content

Commit a0e837c

Browse files
authored
Create main.yml
1 parent 0939cfe commit a0e837c

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build Sample Project
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
buildForAllSupportedPlatforms:
7+
name: Build for ${{ matrix.targetPlatform }}
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
projectPath:
13+
- Samples/AppKit Sample
14+
targetPlatform:
15+
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
16+
# - StandaloneWindows # Build a Windows standalone.
17+
# - StandaloneWindows64 # Build a Windows 64-bit standalone.
18+
# - StandaloneLinux64 # Build a Linux 64-bit standalone.
19+
# - iOS # Build an iOS player.
20+
- Android # Build an Android .apk standalone app.
21+
# - WebGL # WebGL.
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
lfs: true
27+
- uses: actions/cache@v3
28+
with:
29+
path: Library
30+
key: Library-${{ matrix.targetPlatform }}
31+
restore-keys: Library-
32+
- if: matrix.targetPlatform == 'Android'
33+
uses: jlumbroso/free-disk-space@v1.3.1
34+
- uses: game-ci/unity-builder@v4
35+
env:
36+
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
37+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
38+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
39+
with:
40+
targetPlatform: ${{ matrix.targetPlatform }}
41+
- uses: actions/upload-artifact@v3
42+
with:
43+
name: Build-${{ matrix.targetPlatform }}
44+
path: build/${{ matrix.targetPlatform }}

0 commit comments

Comments
 (0)