test release #5
@@ -22,6 +22,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y curl gnupg
|
apt-get install -y curl gnupg
|
||||||
|
apt-get install -y blender
|
||||||
|
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
run: |
|
run: |
|
||||||
@@ -36,27 +37,29 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir -v -p ~/.local/share/godot/export_templates/
|
|
||||||
mkdir -v -p ~/.config/
|
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
echo "Installing Blender ${{ env.BLENDER_VERSION }}..."
|
BLENDER_PATH="/usr/bin/blender"
|
||||||
MAJOR_MINOR="$(echo "${{ env.BLENDER_VERSION }}" | cut -d. -f1,2)"
|
mkdir -pv ~/.config/godot
|
||||||
BLENDER_URL="https://download.blender.org/release/Blender${MAJOR_MINOR}/blender-${{ env.BLENDER_VERSION }}-linux-x64.tar.xz"
|
mkdir -pv ~/.local/share/godot/export_templates/
|
||||||
wget -q "$BLENDER_URL" -O ~/blender.tar.xz
|
|
||||||
tar -xf ~/blender.tar.xz -C ~/
|
|
||||||
BLENDER_DIR="$(find ~ -maxdepth 1 -name "blender-*" -type d | head -n 1)"
|
|
||||||
echo "${BLENDER_DIR}" >> "$GITHUB_PATH"
|
|
||||||
echo "BLENDER_PATH=${BLENDER_DIR}/blender" >> "$GITHUB_ENV"
|
|
||||||
"${BLENDER_DIR}/blender" --version
|
|
||||||
|
|
||||||
GODOT_CFG="$(find ~/.config/godot -name "editor_settings-*.tres" | head -n 1 || true)"
|
GODOT_CFG="$(find ~/.config/godot -name "editor_settings-*.tres" | head -n 1 || true)"
|
||||||
if [ -n "$GODOT_CFG" ]; then
|
|
||||||
|
if [ -z "$GODOT_CFG" ]; then
|
||||||
|
# No settings file exists → create a new one
|
||||||
|
GODOT_CFG="$HOME/.config/godot/editor_settings-4.tres"
|
||||||
|
echo "# Godot editor settings" > "$GODOT_CFG"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set the Blender path
|
||||||
if [ -n "${BLENDER_PATH:-}" ]; then
|
if [ -n "${BLENDER_PATH:-}" ]; then
|
||||||
grep -q '^filesystem/import/blender/blender_path' "$GODOT_CFG" \
|
if grep -q '^filesystem/import/blender/blender_path' "$GODOT_CFG"; then
|
||||||
&& sed -i "s|^filesystem/import/blender/blender_path = .*|filesystem/import/blender/blender_path = \"$BLENDER_PATH\"|" "$GODOT_CFG" \
|
# Replace existing path
|
||||||
|| echo "filesystem/import/blender/blender_path = \"$BLENDER_PATH\"" >> "$GODOT_CFG"
|
sed -i "s|^filesystem/import/blender/blender_path = .*|filesystem/import/blender/blender_path = \"$BLENDER_PATH\"|" "$GODOT_CFG"
|
||||||
|
else
|
||||||
|
# Append new path
|
||||||
|
echo "filesystem/import/blender/blender_path = \"$BLENDER_PATH\"" >> "$GODOT_CFG"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
echo "Blender path configured in $GODOT_CFG"
|
||||||
|
|
||||||
- name: Windows Build
|
- name: Windows Build
|
||||||
run: |
|
run: |
|
||||||
@@ -71,10 +74,10 @@ jobs:
|
|||||||
name: windows
|
name: windows
|
||||||
path: build/windows
|
path: build/windows
|
||||||
|
|
||||||
# export-linux:
|
export-linux:
|
||||||
# name: Linux Export
|
name: Linux Export
|
||||||
# runs-on: ubuntu-24.04 # Use 24.04 with godot 4
|
runs-on: ubuntu-24.04 # Use 24.04 with godot 4
|
||||||
# container: barichello/godot-ci:4.6
|
container: barichello/godot-ci:4.6
|
||||||
# steps:
|
# steps:
|
||||||
# - name: Update and install dependencies
|
# - name: Update and install dependencies
|
||||||
# run: |
|
# run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user