@@ -46,23 +46,51 @@ jobs:
4646 - check
4747 if : ${{ needs.check.outputs.enabled }}
4848 runs-on : ubuntu-latest
49- container :
50- image : barichello/godot-ci:4.3
5149 steps :
5250 - name : Checkout
5351 uses : actions/checkout@v4
5452 with :
5553 lfs : true
5654
57- - name : Set up export templates
55+ - name : Cache Godot Engine downloads
56+ id : cache-godot
57+ uses : actions/cache@v4
58+ with :
59+ path : |
60+ build/godot
61+ build/._sc_
62+ build/editor_data/export_templates/${{ env.GODOT_VERSION }}.stable
63+ key : godot-${{ env.GODOT_VERSION }}
64+
65+ - name : Download Godot Engine from GitHub release
66+ id : download
67+ if : steps.cache-godot.outputs.cache-hit != 'true'
5868 run : |
59- mkdir -v -p ~/.local/share/godot/export_templates/
60- mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
69+ mkdir -p build && cd build
70+
71+ # Download Godot Engine itself
72+ wget https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip && \
73+ unzip Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip && \
74+ mv Godot_v${GODOT_VERSION}-stable_linux.x86_64 godot
75+
76+ # Download export templates
77+ mkdir -p editor_data/export_templates
78+ wget https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_export_templates.tpz && \
79+ unzip Godot_v${GODOT_VERSION}-stable_export_templates.tpz && \
80+ mv templates editor_data/export_templates/${GODOT_VERSION}.stable
81+
82+ # Tell Godot Engine to run in "self-contained" mode so it looks for
83+ # templates here instead of in ~/.local/share/godot/
84+ touch ._sc_
6185
6286 - name : Web Build
6387 run : |
64- mkdir -v -p build/web
65- godot --headless --verbose --export-release "Web" ./build/web/index.html
88+ mkdir -v -p build/web && cd build
89+
90+ # Note that the export path can be confusing; it's relative to the
91+ # Godot project path, NOT necessarily the current directory or Godot
92+ # binary location
93+ ./godot --headless --verbose --path ../ --export-release "Web" ./build/web/index.html
6694
6795 - name : Upload Artifact
6896 uses : actions/upload-pages-artifact@v3
0 commit comments