tools for exporting godot projects via Github Actions
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
|
name: Export
description: exports
inputs:
platform:
description: The platform (web, linux, mac, android)
required: true
extension:
description: File extension (x86_64, exe, etc)
required: true
debug:
description: Debug build or no (non empty string = true)
required: false
default: ""
name:
description: The name ($name.exe) # defaults to $NAME
required: false
runs:
using: composite
steps:
- name: Setup
uses: bend-n/godot-actions/.github/actions/setup-godot@main
- name: Get export name
id: n
uses: bend-n/godot-actions/.github/actions/get-export-name@main
with:
platform: ${{ inputs.platform }}
- name: Build
run: |
p="${{ inputs.platform }}"
echo "::group::${p^} Build"
export="--export"
[[ ${GODOT_VERSION:0:1} -gt 3 ]] && export="--export-release"
[[ -n $debug ]] && export="--export-debug"
mkdir -vp build/${{ inputs.platform }}
n="$NAME"
[[ -z "${{ inputs.name}}" ]] && n="${{ inputs.name }}"
godot -v --headless --path "${{ env.PROJECT_PATH }}" "$export" "${{ steps.n.outputs.export-name }}" "./build/${{ inputs.platform }}/$n.${{ inputs.extension }}"
echo "::endgroup::"
if [[ -f .github/post_export ]]; then
echo "::group::Run post export script"
chmod +x .github/post_export
./.github/post_export ${{ inputs.platform }}
echo "::endgroup::"
fi
shell: bash
- uses: actions/upload-artifact@v3
with:
name: ${{ inputs.platform }}
path: build/${{ inputs.platform}}
if-no-files-found: error
|