-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
62 lines (53 loc) · 2.44 KB
/
action.yml
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 4 iOS Export'
description: 'Export a Godot Engine 4 project to iOS'
author: 'Simon Dalvai @dulvui'
branding:
color: blue
icon: upload-cloud
inputs:
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'
working-directory:
description: 'The working directory'
required: false
default: '.'
runs:
using: "composite"
steps:
- name: Check is running on mac-os
if: runner.os != 'macos'
shell: bash
run: exit 1
- name: Cache Godot files
id: cache-godot
uses: actions/cache@v3
with:
path: |
Godot.app
/Users/runner/Library/Application\ Support/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}}_macos.universal.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}}_macos.universal.zip
unzip Godot_v${{ inputs.godot-version }}-${{ inputs.godot-channel}}_export_templates.tpz
mkdir -p ~/Library/Application\ Support/Godot/export_templates/${{ inputs.godot-version }}.${{ inputs.godot-channel}}
mv templates/* ~/Library/Application\ Support/Godot/export_templates/${{ inputs.godot-version }}.${{ inputs.godot-channel}}
- name: Install coreutils for gtimeout
shell: bash
run: brew install coreutils
- name: Open project once to import assets
shell: bash
continue-on-error: true # timeout will exit with code 124
run: gtimeout 60 ./Godot.app/Contents/MacOS/Godot --headless --path ${{ inputs.working-directory }} -e
- name: Godot iOS export
shell: bash
run: ./Godot.app/Contents/MacOS/Godot --headless --path ${{ inputs.working-directory }} --export-release iOS