From 2eb7f9b2cbfab7ac9026cb59755d367bb15a7b41 Mon Sep 17 00:00:00 2001 From: zwitschi Date: Sat, 30 May 2026 13:23:15 +0200 Subject: [PATCH] Refactor build workflow to install Godot and export templates directly from GitHub releases --- .gitea/workflows/build.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index be40d63..8a47fcf 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -14,9 +14,8 @@ env: jobs: build: name: Export ${{ matrix.platform }} + # Node-capable image so JS actions (checkout, upload-artifact) work on Gitea act_runner. runs-on: ubuntu-latest - container: - image: barichello/godot-ci:4.3 strategy: fail-fast: false matrix: @@ -33,11 +32,23 @@ jobs: with: lfs: true - - name: Install export templates + - name: Install Godot ${{ env.GODOT_VERSION }} + export templates run: | - mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable - cp -r /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable/* \ - ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable/ || true + set -euxo pipefail + GODOT_REL="${GODOT_VERSION}-stable" + BASE="https://github.com/godotengine/godot/releases/download/${GODOT_REL}" + # Editor (headless export uses the editor binary) + curl -fSL -o godot.zip "${BASE}/Godot_v${GODOT_REL}_linux.x86_64.zip" + unzip -o godot.zip + mv "Godot_v${GODOT_REL}_linux.x86_64" /usr/local/bin/godot + chmod +x /usr/local/bin/godot + godot --version + # Export templates + curl -fSL -o templates.tpz "${BASE}/Godot_v${GODOT_REL}_export_templates.tpz" + unzip -o templates.tpz + TPL_DIR="${HOME}/.local/share/godot/export_templates/${GODOT_VERSION}.stable" + mkdir -p "${TPL_DIR}" + mv templates/* "${TPL_DIR}/" - name: Import project (build resource cache) run: godot --headless --import @@ -45,8 +56,9 @@ jobs: - name: Export ${{ matrix.platform }} run: | - mkdir -p build/${{ matrix.platform }} - godot --headless --export-release "${{ matrix.preset }}" build/${{ matrix.platform }}/${{ matrix.output }} + set -euxo pipefail + mkdir -p "build/${{ matrix.platform }}" + godot --headless --export-release "${{ matrix.preset }}" "build/${{ matrix.platform }}/${{ matrix.output }}" - name: Upload artifact uses: actions/upload-artifact@v3