name: Build project on: push: branches: - '**' tags-ignore: - '**' pull_request: branches: - '**' jobs: buildForAllSupportedPlatforms: name: Build for ${{ matrix.targetPlatform }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: unityVersion: - 6000.0.37f1 targetPlatform: - StandaloneWindows64 # Windows 64-bit standalone - StandaloneLinux64 # Linux 64-bit standalone steps: - uses: actions/checkout@v4 with: fetch-depth: 0 lfs: true - uses: actions/cache@v4 with: path: Library key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }} restore-keys: | Library- - uses: https://github.com/game-ci/unity-builder@v4 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} DOCKER_DEFAULT_PLATFORM: linux/amd64 with: runAsHostUser: true unityVersion: ${{ matrix.unityVersion }} targetPlatform: ${{ matrix.targetPlatform }} - name: Zip build artifacts run: | mkdir -p /tmp/zipped_builds if [ "${{ matrix.targetPlatform }}" == "StandaloneLinux64" ]; then cd build/StandaloneLinux64 zip -r /tmp/zipped_builds/build_StandaloneLinux64.zip . \ -x "StandaloneLinux64_BackUpThisFolder_ButDontShipItWithYourGame/**" \ -x "StellarXipher_BurstDebugInformation_DoNotShip/**" cd ../.. elif [ "${{ matrix.targetPlatform }}" == "StandaloneWindows64" ]; then cd build/StandaloneWindows64/build/StandaloneWindows64 zip -r /tmp/zipped_builds/build_StandaloneWindows64.zip . \ -x "StellarXipher_BurstDebugInformation_DoNotShip/**" cd ../../.. fi - name: Debug - List files in /tmp/zipped_builds run: | ls -R /tmp/zipped_builds - name: Create Gitea Release and Upload Assets uses: akkuman/gitea-release-action@v1 env: NODE_OPTIONS: '--max-old-space-size=4096' GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} with: server_url: ${{ github.server_url }} tag_name: ${{ github.sha }} name: Release ${{ github.sha }} draft: false prerelease: false files: | /tmp/zipped_builds/build_${{ matrix.targetPlatform }}.zip md5sum: true sha256sum: true