Build via Script.
This commit is contained in:
@@ -27,16 +27,15 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build Unity Player (${{ matrix.platform }})
|
||||
env:
|
||||
UNITY_BUILD_OUTPUT_PATH: "${{ github.workspace }}/Builds/${{ matrix.platform }}/${{ matrix.output_file }}"
|
||||
run: |
|
||||
set -e
|
||||
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"
|
||||
|
||||
LOG_FILE="${BUILD_DIR}/build-${{ matrix.platform }}.log"
|
||||
|
||||
mkdir -p "$BUILD_DIR"
|
||||
|
||||
"$UNITY_EDITOR_PATH" \
|
||||
@@ -44,17 +43,18 @@ jobs:
|
||||
-quit \
|
||||
-projectPath "$PROJECT_PATH" \
|
||||
-buildTarget "${{ matrix.build_target }}" \
|
||||
-customBuildPath "$BUILD_DIR/${{ matrix.output_file }}" \
|
||||
-logFile "Builds/unity-${{ matrix.platform }}.log"
|
||||
-customBuildPath "$UNITY_BUILD_OUTPUT_PATH" \
|
||||
-executeMethod CommandLineBuild.BuildFromCli \
|
||||
-logFile "$LOG_FILE"
|
||||
|
||||
- name: Print Unity Logs on Failure
|
||||
if: failure()
|
||||
run: |
|
||||
echo "=== Custom Log ==="
|
||||
cat "Builds/${{ matrix.platform }}/unity-build.log" 2>/dev/null || echo "Kein Custom-Log vorhanden"
|
||||
echo "=== Build Log ==="
|
||||
cat "Builds/${{ matrix.platform }}/build-${{ matrix.platform }}.log" 2>/dev/null || echo "Kein Build-Log vorhanden"
|
||||
echo "=== Unity Editor.log ==="
|
||||
tail -n 150 "$HOME/.config/unity3d/Unity/Editor.log" 2>/dev/null || echo "Kein Editor.log vorhanden"
|
||||
|
||||
|
||||
- name: Fix macOS Executable Permissions
|
||||
if: matrix.platform == 'macos'
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user