diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 612d924..aa63bd1 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -25,7 +25,7 @@ jobs: uses: actions/cache@v4 with: path: /usr/local/bin/godot - key: godot-${{ runner.os }}-${{ env.GODOT_VERSION }}-v1 + key: godot-checks-${{ runner.os }}-${{ env.GODOT_VERSION }}-v2 - name: Install Godot 4.7.2 run: | @@ -75,13 +75,13 @@ jobs: uses: actions/cache@v4 with: path: /usr/local/bin/godot - key: godot-${{ runner.os }}-${{ env.GODOT_VERSION }}-v1 + key: godot-build-${{ runner.os }}-${{ env.GODOT_VERSION }}-v2 - name: Restore export templates cache uses: actions/cache@v4 with: path: ~/.local/share/godot/export_templates/4.7.2.stable - key: godot-templates-${{ runner.os }}-${{ env.GODOT_VERSION }}-v1 + key: godot-templates-${{ runner.os }}-${{ env.GODOT_VERSION }}-v2 - name: Install Godot 4.7.2 and export templates run: | @@ -92,17 +92,26 @@ jobs: sudo install /tmp/godot-bin/Godot_v4.7.2-stable_linux.x86_64 /usr/local/bin/godot fi godot --version - if [ -f "$HOME/.local/share/godot/export_templates/4.7.2.stable/linux_release.x86_64" ]; then - ls "$HOME/.local/share/godot/export_templates/4.7.2.stable" | head -5 + TEMPLATE_DIR="$HOME/.local/share/godot/export_templates/4.7.2.stable" + NEEDED="version.txt icudt_godot.dat linux_release.x86_64 windows_release_x86_64.exe macos.zip web_nothreads_release.zip web_dlink_nothreads_release.zip" + missing=0 + for file in $NEEDED; do + [ -f "$TEMPLATE_DIR/$file" ] || missing=1 + done + if [ "$missing" -eq 0 ]; then + echo "export templates restored from cache" + ls "$TEMPLATE_DIR" | head -10 exit 0 fi curl -sL -o /tmp/templates.tpz \ https://github.com/godotengine/godot/releases/download/4.7.2-stable/Godot_v4.7.2-stable_export_templates.tpz rm -rf /tmp/tpl && mkdir -p /tmp/tpl unzip -qo /tmp/templates.tpz -d /tmp/tpl - mkdir -p "$HOME/.local/share/godot/export_templates/4.7.2.stable" - cp /tmp/tpl/templates/* "$HOME/.local/share/godot/export_templates/4.7.2.stable/" - ls "$HOME/.local/share/godot/export_templates/4.7.2.stable" | head -5 + mkdir -p "$TEMPLATE_DIR" + for file in $NEEDED; do + cp "/tmp/tpl/templates/$file" "$TEMPLATE_DIR/$file" + done + ls "$TEMPLATE_DIR" | head -10 - name: Import project run: godot --headless --import diff --git a/docs/RELEASING.md b/docs/RELEASING.md index 8c0fae1..182595b 100644 --- a/docs/RELEASING.md +++ b/docs/RELEASING.md @@ -63,10 +63,11 @@ setup, so do not rely on it. > artifacts. If CI publishing fails again, run > `./tools/publish_release.sh ` from a checkout with `~/.git-credentials`. -> **Godot cache:** the workflow uses Gitea Actions cache for the Godot binary and the -> 4.7.2 export templates. The first run still downloads them; subsequent runs restore -> from cache. If the host cache service is unavailable, remove the cache steps and -> let the install steps download fresh copies. +> **Godot cache:** the workflow uses Gitea Actions cache for the Godot binary and a +> trimmed 4.7.2 export-template set (Linux/Windows/macOS/Web release files only, not +> Android/iOS). The first run still downloads them; subsequent runs restore from cache. +> If the host cache service is unavailable, remove the cache steps and let the install +> steps download fresh copies. > The workflow lives in `.gitea/workflows/` (Gitea's canonical path). The old > `.github/workflows/ci.yml` was removed to avoid double runs on hosts that scan