Fix Project path in Pipeline.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user