diff --git a/.gitea/workflows/build-game.yml b/.gitea/workflows/build-game.yml index 7d547484..989ec657 100644 --- a/.gitea/workflows/build-game.yml +++ b/.gitea/workflows/build-game.yml @@ -21,6 +21,7 @@ jobs: output_file: Game-macOS.app env: UNITY_EDITOR_PATH: "/home/stefan-uni/Unity/Hub/Editor/6000.6.8f1/Editor/Unity" + UNITY_PROJECT_SUBDIR: "My Project" steps: - name: Checkout Unity Repo uses: actions/checkout@v4 @@ -28,14 +29,21 @@ jobs: - name: Build Unity Player (${{ matrix.platform }}) run: | set -e - BUILD_DIR="Builds/${{ matrix.platform }}" + REPO_ROOT="$(pwd)" + PROJECT_PATH="$${REPO_ROOT}/${UNITY_PROJECT_SUBDIR}" + BUILD_DIR="${REPO_ROOT}/Builds/${{ matrix.platform }}" + + echo "REPO_ROOT: $REPO_ROOT" + echo "PROJECT_PATH: $PROJECT_PATH" + echo "BUILD_DIR: $BUILD_DIR" + mkdir -p "$BUILD_DIR" "$UNITY_EDITOR_PATH" \ -batchmode \ -nographics \ -quit \ - -projectPath "$(pwd)" \ + -projectPath "$PROJECT_PATH" \ -buildTarget "${{ matrix.build_target }}" \ -customBuildPath "$BUILD_DIR/${{ matrix.output_file }}" \ -logFile "Builds/unity-${{ matrix.platform }}.log"