Skip to content

ci: add game ci

ci: add game ci #2

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
name: Build for ${{ matrix.targetPlatform }} ✨
strategy:
matrix:
targetPlatform:
- StandaloneOSX
- StandaloneWindows
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
# Cache
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ matrix.targetPlatform }}-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-${{ matrix.targetPlatform }}-
Library-
# Build
- name: Build project
uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
# Output
- uses: actions/upload-artifact@v3
with:
name: Build
path: build