Fix Project path in Pipeline.
This commit is contained in:
@@ -21,6 +21,7 @@ jobs:
|
|||||||
output_file: Game-macOS.app
|
output_file: Game-macOS.app
|
||||||
env:
|
env:
|
||||||
UNITY_EDITOR_PATH: "/home/stefan-uni/Unity/Hub/Editor/6000.6.8f1/Editor/Unity"
|
UNITY_EDITOR_PATH: "/home/stefan-uni/Unity/Hub/Editor/6000.6.8f1/Editor/Unity"
|
||||||
|
UNITY_PROJECT_SUBDIR: "My Project"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Unity Repo
|
- name: Checkout Unity Repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -28,14 +29,21 @@ jobs:
|
|||||||
- name: Build Unity Player (${{ matrix.platform }})
|
- name: Build Unity Player (${{ matrix.platform }})
|
||||||
run: |
|
run: |
|
||||||
set -e
|
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"
|
mkdir -p "$BUILD_DIR"
|
||||||
|
|
||||||
"$UNITY_EDITOR_PATH" \
|
"$UNITY_EDITOR_PATH" \
|
||||||
-batchmode \
|
-batchmode \
|
||||||
-nographics \
|
-nographics \
|
||||||
-quit \
|
-quit \
|
||||||
-projectPath "$(pwd)" \
|
-projectPath "$PROJECT_PATH" \
|
||||||
-buildTarget "${{ matrix.build_target }}" \
|
-buildTarget "${{ matrix.build_target }}" \
|
||||||
-customBuildPath "$BUILD_DIR/${{ matrix.output_file }}" \
|
-customBuildPath "$BUILD_DIR/${{ matrix.output_file }}" \
|
||||||
-logFile "Builds/unity-${{ matrix.platform }}.log"
|
-logFile "Builds/unity-${{ matrix.platform }}.log"
|
||||||
|
|||||||
Reference in New Issue
Block a user