From 86274ab1bf35cca1d98417acdcf1b16374b864c8 Mon Sep 17 00:00:00 2001 From: ArthurErlich Date: Tue, 17 Mar 2026 23:33:41 +0100 Subject: [PATCH] added linux build --- .gitea/workflows/release.yml | 78 +++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 28 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index decefe6..f632b21 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -78,38 +78,60 @@ jobs: name: Linux Export runs-on: ubuntu-24.04 # Use 24.04 with godot 4 container: barichello/godot-ci:4.6 - # steps: - # - name: Update and install dependencies - # run: | - # apt-get update - # apt-get install -y curl gnupg + steps: + - name: Update and install dependencies + run: | + apt-get update + apt-get install -y curl gnupg - # - name: Install Node.js - # run: | - # curl -fsSL https://deb.nodesource.com/setup_20.x | bash - - # apt-get install -y nodejs + - name: Install Node.js + run: | + curl -fsSL https://deb.nodesource.com/setup_20.x | bash - + apt-get install -y nodejs - # - name: Checkout - # uses: actions/checkout@v4 - # with: - # lfs: true - # - name: Setup - # run: | - # mkdir -v -p ~/.local/share/godot/export_templates/ + - name: Checkout + uses: actions/checkout@v4 + with: + lfs: true + - name: Setup + shell: bash + run: | + set -Eeuo pipefail + BLENDER_PATH="/usr/bin/blender" + mkdir -pv ~/.config/godot + mkdir -pv ~/.local/share/godot/export_templates/ + GODOT_CFG="$(find ~/.config/godot -name "editor_settings-*.tres" | head -n 1 || true)" - # - name: Linux Build - # run: | - # set -Eeuo pipefail - # mkdir -v -p build/linux - # EXPORT_DIR="$(readlink -f build)" - # cd $PROJECT_PATH - # godot --headless --export-release "Linux/X11" "$EXPORT_DIR/linux/$EXPORT_NAME.x86_64" + if [ -z "$GODOT_CFG" ]; then + echo "# Missing Godot editor settings" > "$GODOT_CFG" + exit 1 + fi - # - name: Upload Artifact - # uses: actions/upload-artifact@v3 - # with: - # name: linux - # path: build/linux + # Set the Blender path + if [ -n "${BLENDER_PATH:-}" ]; then + if grep -q '^filesystem/import/blender/blender_path' "$GODOT_CFG"; then + # Replace existing path + 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 + echo "Blender path configured in $GODOT_CFG" + + - name: Linux Build + run: | + set -Eeuo pipefail + mkdir -v -p build/linux + EXPORT_DIR="$(readlink -f build)" + cd $PROJECT_PATH + godot --headless --export-release "Linux/X11" "$EXPORT_DIR/linux/$EXPORT_NAME.x86_64" + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: linux + path: build/linux create-release: name: Create Release