added linux build
Some checks failed
Build Release / Linux Export (pull_request) Failing after 2m1s
Build Release / Windows Export (pull_request) Successful in 2m42s
Build Release / Create Release (pull_request) Has been skipped

This commit is contained in:
2026-03-17 23:33:41 +01:00
parent 248496db91
commit 86274ab1bf

View File

@@ -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