mirror of
https://github.com/theoleuthardt/DinoGame.git
synced 2026-06-13 09:27:57 +00:00
fix: test if assets are there
This commit is contained in:
parent
346eba766b
commit
cac123bb58
1 changed files with 27 additions and 28 deletions
55
.github/workflows/release.yml
vendored
55
.github/workflows/release.yml
vendored
|
|
@ -38,39 +38,23 @@ jobs:
|
|||
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
|
||||
shell: powershell
|
||||
|
||||
- name: List Current Directory
|
||||
run: ls -la
|
||||
shell: bash
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake -B build
|
||||
shell: bash
|
||||
|
||||
# Modifikation hier - manuelles Kopieren der Assets vor dem Build
|
||||
- name: Copy Assets (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
mkdir -p build/macos
|
||||
cp -r assets build/macos/
|
||||
shell: bash
|
||||
|
||||
- name: Copy Assets (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
mkdir -p build/linux
|
||||
cp -r assets build/linux/
|
||||
shell: bash
|
||||
|
||||
- name: Copy Assets (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
mkdir -p build/windows
|
||||
cp -r assets build/windows/
|
||||
if [ -d "assets" ]; then
|
||||
echo "Assets directory exists"
|
||||
else
|
||||
echo "Assets directory does not exist"
|
||||
mkdir -p assets
|
||||
fi
|
||||
cmake -B build
|
||||
shell: bash
|
||||
|
||||
- name: Build Project
|
||||
run: |
|
||||
if [ "${{ runner.os }}" == "macOS" ]; then
|
||||
cmake --build build --config Release --target DinoGame
|
||||
else
|
||||
cmake --build build --config Release
|
||||
fi
|
||||
run: cmake --build build --config Release
|
||||
shell: bash
|
||||
|
||||
- name: Determine Output Directory
|
||||
|
|
@ -85,6 +69,21 @@ jobs:
|
|||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Fix Assets (if necessary)
|
||||
run: |
|
||||
TARGET_DIR="${{ steps.get-output-dir.outputs.output_dir }}/assets"
|
||||
if [ ! -d "$TARGET_DIR" ]; then
|
||||
echo "Creating assets directory in output directory"
|
||||
mkdir -p "$TARGET_DIR"
|
||||
# Wenn das ursprüngliche assets-Verzeichnis existiert, kopiere seinen Inhalt
|
||||
if [ -d "assets" ]; then
|
||||
cp -r assets/* "$TARGET_DIR"/ || echo "Note: No assets to copy or copy failed"
|
||||
else
|
||||
echo "No source assets directory found, creating empty directory"
|
||||
fi
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Zip Build with Assets (Linux/macOS)
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue