name: Setup Godot description: Download a Godot headless Linux binary and (optionally) export templates. inputs: version: description: Godot version (e.g. 4.6). Templates land under .stable. required: false default: "4.6" templates: description: Install export templates too. "true" / "false". required: false default: "false" runs: using: composite steps: - name: Install Godot ${{ inputs.version }} shell: bash run: | set -euo pipefail VER="${{ inputs.version }}" URL="https://github.com/godotengine/godot/releases/download/${VER}-stable/Godot_v${VER}-stable_linux.x86_64.zip" wget -q "$URL" -O /tmp/godot.zip mkdir -p "$HOME/bin" unzip -q /tmp/godot.zip -d /tmp mv "/tmp/Godot_v${VER}-stable_linux.x86_64" "$HOME/bin/godot" chmod +x "$HOME/bin/godot" echo "$HOME/bin" >> "$GITHUB_PATH" "$HOME/bin/godot" --version - name: Install export templates if: inputs.templates == 'true' shell: bash run: | set -euo pipefail VER="${{ inputs.version }}" URL="https://github.com/godotengine/godot/releases/download/${VER}-stable/Godot_v${VER}-stable_export_templates.tpz" wget -q "$URL" -O /tmp/templates.tpz DEST="$HOME/.local/share/godot/export_templates/${VER}.stable" mkdir -p "$DEST" unzip -q /tmp/templates.tpz -d /tmp/templates_extracted mv /tmp/templates_extracted/templates/* "$DEST/" ls "$DEST" | head