Skip to content

Commit c967920

Browse files
committed
Merge branch 'main' into feature/sample-upgrade
2 parents def66b2 + e062956 commit c967920

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build Sample Project
2+
3+
on: [push, pull_request, workflow_dispatch]
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+
- if: matrix.targetPlatform == 'Android' || matrix.targetPlatform == 'WebGL'
24+
uses: jlumbroso/free-disk-space@v1.3.1
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
- uses: actions/cache@v3
29+
with:
30+
path: ${{ matrix.projectPath }}/Library
31+
key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}
32+
restore-keys: Library-
33+
- uses: game-ci/unity-builder@v4
34+
env:
35+
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
36+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
37+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
38+
with:
39+
buildsPath: Build
40+
projectPath: ${{ matrix.projectPath }}
41+
targetPlatform: ${{ matrix.targetPlatform }}
42+
customParameters: -Development
43+
- uses: actions/upload-artifact@v3
44+
with:
45+
name: Build-${{ matrix.targetPlatform }}
46+
path: Build/${{ matrix.targetPlatform }}
47+
48+
deployToVercel:
49+
name: Deploy to Vercel
50+
runs-on: ubuntu-latest
51+
needs: buildForAllSupportedPlatforms
52+
steps:
53+
- uses: actions/checkout@v4
54+
with:
55+
fetch-depth: 0
56+
- name: Download WebGL Build Artifact
57+
uses: actions/download-artifact@v3
58+
with:
59+
name: Build-WebGL
60+
path: Build/WebGL
61+
- name: Deploy to Vercel
62+
uses: amondnet/vercel-action@v20
63+
with:
64+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
65+
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
66+
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
67+
working-directory: Build/WebGL

0 commit comments

Comments
 (0)