From de123785b82ab78bbb2d523d68c6c85f32fd1747 Mon Sep 17 00:00:00 2001 From: Ondrej Rehacek Date: Thu, 20 Jun 2024 14:49:00 +0200 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 62 +++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b97e89..8cd84aa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,32 +1,38 @@ -name: Build & Test Stash Unity +name: Test Build 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. - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - lfs: true - - uses: actions/cache@v2 - with: - path: Library - key: Library-${{ matrix.targetPlatform }} - restore-keys: Library- - - uses: game-ci/unity-builder@v2 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - with: - targetPlatform: ${{ matrix.targetPlatform }} - - uses: actions/upload-artifact@v2 - with: - name: Build-${{ matrix.targetPlatform }} - path: build/${{ matrix.targetPlatform }} + build: + name: Build SDK & Sample Scenes + 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-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }} + restore-keys: | + 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: WebGL + + # Output + - uses: actions/upload-artifact@v3 + with: + name: Build + path: build