99 lines
3.8 KiB
YAML
99 lines
3.8 KiB
YAML
name: Export Godot project
|
|
description: Download and cache Godot 4, install export templates, and export a named preset without Docker.
|
|
|
|
inputs:
|
|
godot-version:
|
|
description: Exact Godot 4 release tag without a leading v (for example, 4.6.1-stable).
|
|
required: true
|
|
host-os:
|
|
description: "Runner operating system: linux, macos, or windows."
|
|
required: true
|
|
host-arch:
|
|
description: Runner architecture. Supported values depend on host-os.
|
|
required: true
|
|
dotnet:
|
|
description: Download the Godot .NET editor and export templates.
|
|
required: false
|
|
default: "false"
|
|
project-path:
|
|
description: Godot project directory, relative to the checked-out workspace.
|
|
required: false
|
|
default: .
|
|
export-preset:
|
|
description: Exact export preset name from export_presets.cfg.
|
|
required: true
|
|
export-mode:
|
|
description: "Export mode: release or debug."
|
|
required: false
|
|
default: debug
|
|
export-file-name:
|
|
description: Output filename only, including its platform-appropriate extension.
|
|
required: true
|
|
cache:
|
|
description: Restore and save the downloaded Godot editor and export templates.
|
|
required: false
|
|
default: "true"
|
|
|
|
outputs:
|
|
build-directory:
|
|
description: Absolute directory containing this invocation's exported build.
|
|
value: ${{ steps.export-linux.outputs.build-directory || steps.export-macos.outputs.build-directory || steps.export-windows.outputs.build-directory }}
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Restore Godot cache
|
|
if: ${{ inputs.cache == 'true' }}
|
|
uses: actions/cache@v4.1.0
|
|
with:
|
|
path: "${{ runner.temp }}/godot-export-action/cache"
|
|
key: "godot-export-action-v1-${{ inputs.godot-version }}-${{ inputs.dotnet }}-${{ inputs.host-os }}-${{ inputs.host-arch }}"
|
|
|
|
- name: Export Godot project on Linux
|
|
id: export-linux
|
|
if: ${{ runner.os == 'Linux' }}
|
|
shell: bash
|
|
env:
|
|
GODOT_VERSION: "${{ inputs.godot-version }}"
|
|
GODOT_HOST_OS: "${{ inputs.host-os }}"
|
|
GODOT_HOST_ARCH: "${{ inputs.host-arch }}"
|
|
GODOT_DOTNET: "${{ inputs.dotnet }}"
|
|
GODOT_PROJECT_PATH: "${{ inputs.project-path }}"
|
|
GODOT_EXPORT_PRESET: "${{ inputs.export-preset }}"
|
|
GODOT_EXPORT_MODE: "${{ inputs.export-mode }}"
|
|
GODOT_EXPORT_FILE_NAME: "${{ inputs.export-file-name }}"
|
|
GODOT_ACTION_ROOT: "${{ runner.temp }}/godot-export-action"
|
|
run: bash "$GITHUB_ACTION_PATH/export-linux.sh"
|
|
|
|
- name: Export Godot project on macOS
|
|
id: export-macos
|
|
if: ${{ runner.os == 'macOS' }}
|
|
shell: bash
|
|
env:
|
|
GODOT_VERSION: "${{ inputs.godot-version }}"
|
|
GODOT_HOST_OS: "${{ inputs.host-os }}"
|
|
GODOT_HOST_ARCH: "${{ inputs.host-arch }}"
|
|
GODOT_DOTNET: "${{ inputs.dotnet }}"
|
|
GODOT_PROJECT_PATH: "${{ inputs.project-path }}"
|
|
GODOT_EXPORT_PRESET: "${{ inputs.export-preset }}"
|
|
GODOT_EXPORT_MODE: "${{ inputs.export-mode }}"
|
|
GODOT_EXPORT_FILE_NAME: "${{ inputs.export-file-name }}"
|
|
GODOT_ACTION_ROOT: "${{ runner.temp }}/godot-export-action"
|
|
run: bash "$GITHUB_ACTION_PATH/export-macos.sh"
|
|
|
|
- name: Export Godot project on Windows
|
|
id: export-windows
|
|
if: ${{ runner.os == 'Windows' }}
|
|
shell: powershell
|
|
env:
|
|
GODOT_VERSION: "${{ inputs.godot-version }}"
|
|
GODOT_HOST_OS: "${{ inputs.host-os }}"
|
|
GODOT_HOST_ARCH: "${{ inputs.host-arch }}"
|
|
GODOT_DOTNET: "${{ inputs.dotnet }}"
|
|
GODOT_PROJECT_PATH: "${{ inputs.project-path }}"
|
|
GODOT_EXPORT_PRESET: "${{ inputs.export-preset }}"
|
|
GODOT_EXPORT_MODE: "${{ inputs.export-mode }}"
|
|
GODOT_EXPORT_FILE_NAME: "${{ inputs.export-file-name }}"
|
|
GODOT_ACTION_ROOT: "${{ runner.temp }}/godot-export-action"
|
|
run: "& \"$env:GITHUB_ACTION_PATH\\export-windows.ps1\""
|