From e845c1be254b7dc3000efd1449b4454d34fc39aa Mon Sep 17 00:00:00 2001 From: god Date: Sat, 4 Jul 2026 20:21:15 +0800 Subject: [PATCH] ci: use cached godot export templates for patch deployment --- .gitea/workflows/deploy_patch.yml | 36 ++++++++++++++++++------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/deploy_patch.yml b/.gitea/workflows/deploy_patch.yml index 4b8b4ba..72eeeb7 100644 --- a/.gitea/workflows/deploy_patch.yml +++ b/.gitea/workflows/deploy_patch.yml @@ -26,23 +26,29 @@ jobs: git config user.name "god" git config user.email "god@noreply.git.klud.top" - - name: Setup Godot + - name: Setup Godot (Cached) run: | - wget -q https://github.com/godotengine/godot-builds/releases/download/4.7-stable/Godot_v4.7-stable_linux.x86_64.zip -O /tmp/godot.zip - unzip -q /tmp/godot.zip -d /tmp/godot - mv /tmp/godot/Godot_v4.7-stable_linux.x86_64 /usr/local/bin/godot - chmod +x /usr/local/bin/godot - - - name: Install export templates - run: | - wget -nv https://github.com/godotengine/godot-builds/releases/download/4.7-stable/Godot_v4.7-stable_export_templates.tpz -O /tmp/godot-templates.tpz - unzip -o -q /tmp/godot-templates.tpz -d /tmp/godot-templates - mkdir -p ~/.local/share/godot/export_templates/4.7.stable - if [ -d /tmp/godot-templates/templates ]; then - mv /tmp/godot-templates/templates/* ~/.local/share/godot/export_templates/4.7.stable/ - else - mv /tmp/godot-templates/* ~/.local/share/godot/export_templates/4.7.stable/ + apt-get install -y zip + if [ ! -f /cache/godot_4.7 ]; then + echo "Downloading Godot 4.7..." + curl -sL -o /tmp/godot.zip "https://github.com/godotengine/godot-builds/releases/download/4.7-stable/Godot_v4.7-stable_linux.x86_64.zip" + unzip -q -o /tmp/godot.zip -d /cache/ + mv /cache/Godot_v4.7-stable_linux.x86_64 /cache/godot_4.7 fi + cp /cache/godot_4.7 /usr/local/bin/godot + chmod +x /usr/local/bin/godot + mkdir -p ~/.local/share/godot/export_templates/4.7.stable + if [ ! -f /cache/Godot_v4.7-stable_export_templates.tpz ]; then + echo "Downloading templates..." + curl -sL -o /cache/Godot_v4.7-stable_export_templates.tpz \ + "https://github.com/godotengine/godot-builds/releases/download/4.7-stable/Godot_v4.7-stable_export_templates.tpz" + fi + cd ~/.local/share/godot/export_templates/4.7.stable + unzip -q -o /cache/Godot_v4.7-stable_export_templates.tpz + mv templates/* . 2>/dev/null || true + rm -rf templates + cd $GITHUB_WORKSPACE + mkdir -p build - name: Generate version.json & bump version env: