From de123785b82ab78bbb2d523d68c6c85f32fd1747 Mon Sep 17 00:00:00 2001 From: Ondrej Rehacek Date: Thu, 20 Jun 2024 14:49:00 +0200 Subject: [PATCH 1/3] 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 From 0aabedba95a58cba8f8824d779ab4d073954947d Mon Sep 17 00:00:00 2001 From: Ondrej Rehacek Date: Thu, 20 Jun 2024 14:53:05 +0200 Subject: [PATCH 2/3] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8cd84aa..91654b8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,7 @@ jobs: UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} with: - targetPlatform: WebGL + targetPlatform: Android # Output - uses: actions/upload-artifact@v3 From 76b74300f4b9acffda7c31c4a1904554c62072b4 Mon Sep 17 00:00:00 2001 From: Ondrej Rehacek Date: Thu, 20 Jun 2024 15:10:11 +0200 Subject: [PATCH 3/3] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 91654b8..c1719db 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: build: - name: Build SDK & Sample Scenes + name: Test Package & Sample Scenes runs-on: ubuntu-latest steps: # Checkout @@ -29,7 +29,7 @@ jobs: UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} with: - targetPlatform: Android + targetPlatform: StandaloneWindows64 # Output - uses: actions/upload-artifact@v3