Refactor build workflow to install Godot and export templates directly from GitHub releases
Build / Export windows (push) Successful in 8m1s
Build / Export linux (push) Successful in 17m0s

This commit is contained in:
2026-05-30 13:23:15 +02:00
parent 31e03335cb
commit 2eb7f9b2cb
+20 -8
View File
@@ -14,9 +14,8 @@ env:
jobs: jobs:
build: build:
name: Export ${{ matrix.platform }} name: Export ${{ matrix.platform }}
# Node-capable image so JS actions (checkout, upload-artifact) work on Gitea act_runner.
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: barichello/godot-ci:4.3
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -33,11 +32,23 @@ jobs:
with: with:
lfs: true lfs: true
- name: Install export templates - name: Install Godot ${{ env.GODOT_VERSION }} + export templates
run: | run: |
mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable set -euxo pipefail
cp -r /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable/* \ GODOT_REL="${GODOT_VERSION}-stable"
~/.local/share/godot/export_templates/${GODOT_VERSION}.stable/ || true 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) - name: Import project (build resource cache)
run: godot --headless --import run: godot --headless --import
@@ -45,8 +56,9 @@ jobs:
- name: Export ${{ matrix.platform }} - name: Export ${{ matrix.platform }}
run: | run: |
mkdir -p build/${{ matrix.platform }} set -euxo pipefail
godot --headless --export-release "${{ matrix.preset }}" build/${{ matrix.platform }}/${{ matrix.output }} mkdir -p "build/${{ matrix.platform }}"
godot --headless --export-release "${{ matrix.preset }}" "build/${{ matrix.platform }}/${{ matrix.output }}"
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3