diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 82fa014..d4bbfc6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,12 +28,12 @@ jobs: matrix: targetPlatform: - StandaloneLinux64 # Build a Linux 64-bit standalone. - # - iOS # Build an iOS player. - # - Android # Build an Android player. - # - WebGL # WebGL. steps: + - run: | + sudo apt update - uses: actions/checkout@v3 with: + fetch-depth: 0 lfs: true - uses: actions/cache@v3 with: @@ -54,58 +54,33 @@ jobs: - uses: game-ci/unity-builder@v2 with: targetPlatform: ${{ matrix.targetPlatform }} - customParameters: '-myParameter myValue -myBoolean -ThirdParameter andItsValue' # We use dirty build because we are replacing the default project settings file above allowDirtyBuild: true - uses: actions/upload-artifact@v3 with: - name: Build for ${{ matrix.targetPlatform }} - path: build + name: Build-${{ matrix.targetPlatform }} + path: build/${{ matrix.targetPlatform }} - buildForWindowsBasedPlatforms: + buildForAllSupportedPlatforms: # Except Linux above name: Build for ${{ matrix.targetPlatform }} - runs-on: windows-2019 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: targetPlatform: - # - StandaloneWindows # Build a Windows 32-bit standalone. + - StandaloneOSX # Build a macOS standalone (Intel 64-bit). + # - StandaloneWindows # Build a Windows standalone. - StandaloneWindows64 # Build a Windows 64-bit standalone. - # - tvOS # Build an AppleTV player. - # - WSAPlayer # Build a UWP App. - steps: - - uses: actions/checkout@v3 - with: - lfs: true - - uses: actions/cache@v3 - with: - path: Library - key: Library-${{ matrix.targetPlatform }} - restore-keys: | - Library-${{ matrix.targetPlatform }} - Library- - - uses: game-ci/unity-builder@v2 - with: - targetPlatform: ${{ matrix.targetPlatform }} - customParameters: '-myParameter myValue -myBoolean -ThirdParameter andItsValue' - # We use dirty build because we are replacing the default project settings file above - allowDirtyBuild: true - - uses: actions/upload-artifact@v3 - with: - name: Build for ${{ matrix.targetPlatform }} - path: build - - buildForMacOSBasedPlatforms: - name: Build for ${{ matrix.targetPlatform }} - runs-on: macos-latest - strategy: - fail-fast: false - matrix: - targetPlatform: - - StandaloneOSX # Build a macOS standalone. + # - StandaloneLinux64 # Build a Linux 64-bit standalone. + # - iOS # Build an iOS player. + # - Android # Build an Android .apk standalone app. + - WebGL # WebGL. steps: + - run: | + sudo apt update - uses: actions/checkout@v3 with: + fetch-depth: 0 lfs: true - uses: actions/cache@v3 with: @@ -114,13 +89,14 @@ jobs: restore-keys: | Library-${{ matrix.targetPlatform }} Library- + - uses: jlumbroso/free-disk-space@main + if: matrix.targetPlatform == 'Android' - uses: game-ci/unity-builder@v2 with: targetPlatform: ${{ matrix.targetPlatform }} - customParameters: '-myParameter myValue -myBoolean -ThirdParameter andItsValue' # We use dirty build because we are replacing the default project settings file above allowDirtyBuild: true - uses: actions/upload-artifact@v3 with: - name: Build for ${{ matrix.targetPlatform }} - path: build + name: Build-${{ matrix.targetPlatform }} + path: build/${{ matrix.targetPlatform }}