This repository was archived by the owner on Jun 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathaction.yml
More file actions
61 lines (54 loc) · 2.61 KB
/
Copy pathaction.yml
File metadata and controls
61 lines (54 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: 'Godot Engine 4.x Web Export'
description: 'Godot Engine 4.x Web export'
author: 'Simon Dalvai @dulvui'
branding:
color: blue
icon: upload-cloud
inputs:
working-directory:
description: 'The working directory'
required: false
default: '.'
godot-version:
description: 'Godot Engine version. Supported are 4.x versions'
required: true
godot-channel:
description: 'Godot Engine release channel (stable, beta, rc1, rc2, rc3...). Defaults to stable'
required: false
default: 'stable'
runs:
using: "composite"
steps:
- name: Check is running on Linux
if: runner.os != 'Linux'
shell: bash
run: exit 1
- name: Cache Godot files
id: cache-godot
uses: actions/cache@v3
with:
path: |
~/.local/share/godot/**
/usr/local/bin/godot
~/.config/godot/**
key: ${{ runner.os }}-godot-${{ inputs.godot-version }}-${{ inputs.godot-channel }}
- name: Download and config Godot Engine linux server and templates
shell: bash
if: steps.cache-godot.outputs.cache-hit != 'true'
run: |
wget -q https://github.com/godotengine/godot-builds/releases/download/${{ inputs.godot-version }}-${{ inputs.godot-channel}}/Godot_v${{ inputs.godot-version }}-${{ inputs.godot-channel }}_linux.x86_64.zip
wget -q https://github.com/godotengine/godot-builds/releases/download/${{ inputs.godot-version }}-${{ inputs.godot-channel}}/Godot_v${{ inputs.godot-version }}-${{ inputs.godot-channel }}_export_templates.tpz
unzip Godot_v${{ inputs.godot-version }}-${{ inputs.godot-channel }}_linux.x86_64.zip
unzip Godot_v${{ inputs.godot-version }}-${{ inputs.godot-channel }}_export_templates.tpz
mkdir -p ~/.local/share/godot/export_templates/${{ inputs.godot-version }}.${{ inputs.godot-channel }}
mkdir -p ~/.config/godot/
mv templates/* ~/.local/share/godot/export_templates/${{ inputs.godot-version }}.${{ inputs.godot-channel }}
rm -f Godot_v${{ inputs.godot-version }}-${{ inputs.godot-channel }}_linux.x86_64.zip Godot_v${{ inputs.godot-version }}-${{ inputs.godot-channel }}_export_templates.tpz
mv ./Godot_v${{ inputs.godot-version }}-${{ inputs.godot-channel }}_linux.x86_64 /usr/local/bin/godot
- name: Open project once to import assets in editor mode
shell: bash
continue-on-error: true # timeout will exit with code 124
run: timeout 25 godot --headless --path ${{ inputs.working-directory }} -e
- name: Export Godot project to html
shell: bash
run: godot --headless --path ${{ inputs.working-directory }} --export-release Web