Godot 4 export action for Gitea
This action takes care of the repetitive part of exporting a Godot game in Gitea: getting the right Godot editor, installing its matching export templates, and running one of the presets already in your project.
It runs directly on the runner you already have. No Docker image is involved, which makes it a good fit for host-based runners on Linux, macOS, and Windows. Once the first build has finished, Godot and its templates are cached so later builds can get straight to exporting.
What it builds
You choose the Godot preset, the build type, and the output filename. The action then puts that build in its own temporary folder and exposes the folder as build-directory, ready for an upload or release step.
The runner's operating system and architecture determine which Godot editor is downloaded. The export preset determines what you are building, so a Linux runner can still export a Windows game when the preset is set up for it.
Getting started
Add the action after checking out your project. In this example, the Godot project lives in games/my-game and exports the Windows Desktop preset:
name: Export game
on: [push]
jobs:
export:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- id: godot-export
uses: https://git.omgitsalexl.me/omgitsalexl/godot-export-action@v1
with:
godot-version: 4.7.2-stable
host-os: linux
host-arch: x86_64
project-path: games/my-game
export-preset: Windows Desktop
export-mode: release
export-file-name: my-game.exe
- uses: actions/upload-artifact@v4
with:
name: my-game
path: ${{ steps.godot-export.outputs.build-directory }}
The uploaded artifact is the whole build folder, so companion files such as a .pck file are kept together with the executable.
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
godot-version |
Yes | — | A stable Godot 4 release tag, without the leading v; for example, 4.7.2-stable. Alpha, beta, RC, and dev tags are unsupported. |
host-os |
Yes | — | The machine running the job: linux, macos, or windows. The action checks this before it starts. |
host-arch |
Yes | — | The runner's architecture. Linux supports x86_32, x86_64, arm32, and arm64; Windows supports x86_32, x86_64, and arm64; macOS supports x86_64 and arm64. |
export-preset |
Yes | — | The preset name exactly as it appears in export_presets.cfg. |
export-file-name |
Yes | — | The name of the exported file, such as my-game.exe or my-game.zip. Use the extension your target expects. |
dotnet |
No | false |
Set this to true for a Godot .NET/C# project. |
project-path |
No | . |
Where your Godot project sits inside the checked-out repository. |
export-mode |
No | debug |
Choose release for a shipping build or debug for a debug build. |
cache |
No | true |
Set to false if you need a completely fresh Godot download for a run. |
Outputs
| Output | Description |
|---|---|
build-directory |
The absolute path to this export's own folder in the runner's temporary directory. |
A few helpful notes
- Your project needs both
project.godotandexport_presets.cfg. Preset names with spaces, such asWindows Desktop, are fine. - Editor and template downloads come from the official Godot stable-release assets and are checked against that release's
SHA512-SUMS.txtbefore anything is extracted. If a release does not provide an editor for the requested runner architecture, the action fails before downloading either archive. - Linux ARM downloads require Godot 4.2 or newer; Windows ARM64 downloads require Godot 4.3 or newer. macOS uses the universal editor archive on both supported architectures.
- On Linux, make sure the runner has
curl,unzip, andsha512sum. macOS needscurl,unzip, andshasum. Windows uses the archive and hashing tools built into PowerShell. - The cache includes the editor and the full export-template package. Gitea keeps that cache on each runner by default; an administrator can configure shared storage if several runners should reuse it.
- This action installs Godot, not every SDK around it. Android, iOS, console, and other platform-specific presets may still need their own SDKs, credentials, or signing setup on the runner.
- The cache step uses
actions/cache@v4.1.0so it works with Gitea Runner 2.x. That runner generation also needs the Gitea artifact fork instead of the stock artifact action.