From a89e54783fe38817f1519eedcc29f5294e21408b Mon Sep 17 00:00:00 2001 From: adtpdn Date: Fri, 3 Jul 2026 14:38:20 +0800 Subject: [PATCH] chore(ci): cp from /cache with wget fallback, fix release tokens --- .gitea/workflows/ci.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 842fe25..f519ebb 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -22,7 +22,11 @@ jobs: - name: Setup Godot run: | - cp /cache/Godot_v4.6-stable_linux.x86_64.zip ./godot.zip + if [ -f /cache/Godot_v4.6-stable_linux.x86_64.zip ]; then + cp /cache/Godot_v4.6-stable_linux.x86_64.zip ./godot.zip + else + wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_linux.x86_64.zip -O godot.zip + fi unzip -q godot.zip mv Godot_v4.6-stable_linux.x86_64 /usr/local/bin/godot chmod +x /usr/local/bin/godot @@ -30,7 +34,11 @@ jobs: - name: Install export templates run: | mkdir -v -p ~/.local/share/godot/export_templates/4.6.stable - cp /cache/Godot_v4.6-stable_export_templates.tpz /tmp/godot-templates.tpz + if [ -f /cache/Godot_v4.6-stable_export_templates.tpz ]; then + cp /cache/Godot_v4.6-stable_export_templates.tpz /tmp/godot-templates.tpz + else + wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_export_templates.tpz -O /tmp/godot-templates.tpz + fi unzip -o -q /tmp/godot-templates.tpz -d /tmp/godot-templates if [ -d /tmp/godot-templates/templates ]; then cp -a /tmp/godot-templates/templates/* ~/.local/share/godot/export_templates/4.6.stable/ @@ -65,7 +73,11 @@ jobs: - name: Setup Godot run: | - cp /cache/Godot_v4.6-stable_linux.x86_64.zip ./godot.zip + if [ -f /cache/Godot_v4.6-stable_linux.x86_64.zip ]; then + cp /cache/Godot_v4.6-stable_linux.x86_64.zip ./godot.zip + else + wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_linux.x86_64.zip -O godot.zip + fi unzip -q godot.zip mv Godot_v4.6-stable_linux.x86_64 /usr/local/bin/godot chmod +x /usr/local/bin/godot @@ -73,7 +85,11 @@ jobs: - name: Install export templates run: | mkdir -v -p ~/.local/share/godot/export_templates/4.6.stable - cp /cache/Godot_v4.6-stable_export_templates.tpz /tmp/godot-templates.tpz + if [ -f /cache/Godot_v4.6-stable_export_templates.tpz ]; then + cp /cache/Godot_v4.6-stable_export_templates.tpz /tmp/godot-templates.tpz + else + wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_export_templates.tpz -O /tmp/godot-templates.tpz + fi unzip -o -q /tmp/godot-templates.tpz -d /tmp/godot-templates if [ -d /tmp/godot-templates/templates ]; then cp -a /tmp/godot-templates/templates/* ~/.local/share/godot/export_templates/4.6.stable/