54 lines
1.6 KiB
YAML
54 lines
1.6 KiB
YAML
name: Build project
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
buildForAllSupportedPlatforms:
|
|
name: Build for ${{ matrix.targetPlatform }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
targetPlatform:
|
|
- StandaloneWindows64 # Build a Windows 64-bit standalone.
|
|
- StandaloneLinux64 # Build a Linux 64-bit standalone.
|
|
unityVersion:
|
|
- 6000.0.37f1
|
|
steps:
|
|
- name: Update APT and Install Curl
|
|
run: |
|
|
apt update
|
|
apt install -y curl
|
|
|
|
- name: Manually Install Node.js and Dependencies
|
|
run: |
|
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
|
apt install -y nodejs
|
|
node -v
|
|
npm -v
|
|
npm install
|
|
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: Library
|
|
key: Library-${{ matrix.targetPlatform }}
|
|
restore-keys: Library-
|
|
- uses: https://gitea.zuzu.red/EthanPisani/unity-builder@v4
|
|
env:
|
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
RUN_AS_HOST_USER: true
|
|
with:
|
|
targetPlatform: ${{ matrix.targetPlatform }}
|
|
unityVersion: ${{ matrix.unityVersion }}
|
|
runAsHostUser: true
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: Build-${{ matrix.targetPlatform }}
|
|
path: build/${{ matrix.targetPlatform }}
|