From 7f0f7aba29581e87f525662d0525cb64189a994d Mon Sep 17 00:00:00 2001 From: Yaser Syafa <89734955+yasersyafa@users.noreply.github.com> Date: Thu, 4 Sep 2025 21:48:41 +0700 Subject: [PATCH] Create build-project.yml --- .github/workflows/build-project.yml | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/build-project.yml diff --git a/.github/workflows/build-project.yml b/.github/workflows/build-project.yml new file mode 100644 index 0000000..a3d3ead --- /dev/null +++ b/.github/workflows/build-project.yml @@ -0,0 +1,42 @@ +name: Build project + +on: [push, pull_request] + +jobs: + buildForAllSupportedPlatforms: + name: Build for ${{ matrix.targetPlatform }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + targetPlatform: + - StandaloneOSX # Build a macOS standalone (Intel 64-bit). + - StandaloneWindows # Build a Windows standalone. + - StandaloneWindows64 # Build a Windows 64-bit standalone. + - StandaloneLinux64 # Build a Linux 64-bit standalone. + - iOS # Build an iOS player. + - Android # Build an Android .apk standalone app. + - WebGL # WebGL. + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + lfs: true + - uses: actions/cache@v3 + with: + path: Library + key: Library-${{ matrix.targetPlatform }} + restore-keys: Library- + - if: matrix.targetPlatform == 'Android' + uses: jlumbroso/free-disk-space@v1.3.1 + - 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 }} + - uses: actions/upload-artifact@v4 + with: + name: Build-${{ matrix.targetPlatform }} + path: build/${{ matrix.targetPlatform }}