From c98d1b0d8a0859d8d7fcda6c8345b65fc71f064e Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Thu, 18 Dec 2025 13:05:38 +0000 Subject: [PATCH] ci: Use reusable export action I have factored out the GitHub Actions steps we copy-paste between many different projects into a reusable composite action. --- .github/workflows/export.yml | 43 ++---------------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) diff --git a/.github/workflows/export.yml b/.github/workflows/export.yml index 3ff6bec..a2f10d6 100644 --- a/.github/workflows/export.yml +++ b/.github/workflows/export.yml @@ -12,9 +12,6 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} -env: - GODOT_VERSION: 4.4.1 - jobs: build: name: Build for web @@ -25,45 +22,9 @@ jobs: with: lfs: true - - name: Cache Godot Engine downloads - id: cache-godot - uses: actions/cache@v5 + - uses: endlessm/godot-export-action@v1 with: - path: | - build/godot - build/._sc_ - build/editor_data/export_templates/${{ env.GODOT_VERSION }}.stable - key: godot-${{ env.GODOT_VERSION }} - - - name: Download Godot Engine from GitHub release - id: download - if: steps.cache-godot.outputs.cache-hit != 'true' - run: | - mkdir -p build && cd build - - # Download Godot Engine itself - wget --progress=dot:giga https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip && \ - unzip Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip && \ - mv Godot_v${GODOT_VERSION}-stable_linux.x86_64 godot - - # Download export templates - mkdir -p editor_data/export_templates - wget --progress=dot:giga https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_export_templates.tpz && \ - unzip Godot_v${GODOT_VERSION}-stable_export_templates.tpz && \ - mv templates editor_data/export_templates/${GODOT_VERSION}.stable - - # Tell Godot Engine to run in "self-contained" mode so it looks for - # templates here instead of in ~/.local/share/godot/ - touch ._sc_ - - - name: Export web release - run: | - mkdir -v -p build/web && cd build - - # Note that the export path can be confusing; it's relative to the - # Godot project path, NOT necessarily the current directory or Godot - # binary location - ./godot --headless --verbose --path ../ --export-release "Web" ./build/web/index.html + godot_version: 4.4.1 - name: Upload web artifact uses: actions/upload-artifact@v6