Files
godot_number_factory/.gitea/workflows/build.yaml
T
bionickatana 44ba374eea
Build Godot Project (Linux) / build-linux (push) Failing after 6s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s
Godot auto build
2026-06-22 10:54:42 -06:00

55 lines
2.2 KiB
YAML

name: Build Godot Project (Linux)
on: [push]
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Auto-Detect Godot Version and Setup Engine
run: |
echo "🔍 Parsing project.godot to identify the target engine version..."
# Extracts the first value out of config/features (e.g., "4.7")
VERSION_SHORT=$(grep "config/features" project.godot | sed -E 's/.*"([^"]+)".*/\1/')
if [ -z "$VERSION_SHORT" ]; then
echo "❌ Error: Could not determine Godot version from project.godot. Defaulting to 4.7"
VERSION_SHORT="4.7"
fi
# Standardizes the formatting naming convention for paths vs engine filenames
VERSION_URL="${VERSION_SHORT}-stable"
VERSION_FILE="${VERSION_SHORT}.stable"
echo "🎯 Detected Target Version: $VERSION_SHORT"
echo "----------------------------------------------"
echo "📥 Downloading Godot Engine ($VERSION_URL)..."
curl -L "https://github.com/godotengine/godot/releases/download/${VERSION_URL}/Godot_v${VERSION_URL}_linux.x86_64.zip" -o godot.zip
unzip godot.zip
mv "Godot_v${VERSION_URL}_linux.x86_64" godot
chmod +x godot
echo "📥 Downloading Export Templates ($VERSION_URL)..."
curl -L "https://github.com/godotengine/godot/releases/download/${VERSION_URL}/Godot_v${VERSION_URL}_export_templates.tpz" -o templates.zip
unzip templates.zip
echo "🔧 Mapping Template Directories..."
mkdir -p ~/.local/share/godot/export_templates/${VERSION_FILE}
mv templates/linux_release.x86_64 ~/.local/share/godot/export_templates/${VERSION_FILE}/linux_release.x86_64
- name: Export Linux Binary
run: |
mkdir -p build/linux
./godot --headless --export-release "Linux" build/linux/godot_number_factory.x86_64
- name: Upload Linux Build Artifact
uses: actions/upload-artifact@v4
with:
name: linux-build
path: build/linux/