A GitHub Action that downloads a specific version of the Godot game engine source and builds it via SCons for one or more target platforms.
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Godot editor
id: godot
uses: ActionCommons/build-godot@v1
with:
version: '4.4'
platform: linuxbsd
target: editor
- name: Show build directory
run: echo "${{ steps.godot.outputs.directory }}"- name: Build export templates
id: godot
uses: ActionCommons/build-godot@v1
with:
version: '4.4'
flavor: stable
platform: |
linuxbsd
windows
target: |
template_debug
template_release
architecture: x86_64A separate SCons invocation is run for every platform × target combination,
so the example above produces four builds.
- name: Build Godot iOS templates
id: godot
uses: ActionCommons/build-godot@v1
with:
version: '4.4'
platform: ios
target: template_release
architecture: arm64
options: |
generate_bundle=yes
ios_simulator=yes- name: Build Godot with headers
id: godot
uses: ActionCommons/build-godot@v1
with:
version: '4.4'
platform: linuxbsd
target: editor
options: |
debug_symbols=yes
create_header_archive
- name: Upload headers
uses: actions/upload-artifact@v7
with:
name: godot-headers
path: ${{ steps.godot.outputs.header_archive }}- name: Build Godot beta
uses: ActionCommons/build-godot@v1
with:
version: '4.5'
flavor: beta2
platform: linuxbsd
target: editor
timeout: '3600'| Input | Required | Default | Description |
|---|---|---|---|
version |
Yes | — | Godot version to build, e.g. 4.4 or 3.6. |
flavor |
No | stable |
Release flavor: stable, dev1, beta2, rc1, etc. |
directory |
No | (temp dir) | Working directory for the build. A unique temporary directory is created when left empty. |
timeout |
No | 0 |
Wall-clock timeout in seconds. The build process is killed after this many seconds. 0 means no timeout. |
platform |
Yes | — | Target platform(s), comma- or newline-separated. Allowed: android, ios, linuxbsd, macos, web, windows. |
target |
Yes | — | Build target(s), comma- or newline-separated. Allowed: editor, template_debug, template_release. |
architecture |
No | auto |
CPU architecture passed as arch= to SCons. Allowed: auto, x86_32, x86_64, arm32, arm64, rv64, ppc32, ppc64, wasm32. auto lets SCons detect the host architecture. |
options |
No | (empty) | Extra build options, comma- or newline-separated. See Options below. |
| Output | Always set | Description |
|---|---|---|
directory |
Yes | Absolute path to the working directory used for the build. |
header_archive |
No | Absolute path to a ZIP of all *.glsl, *.h, *.hh, *.hpp, *.inc, and *.inl files. Only set when create_header_archive is included in options. |
The options input accepts one or more of the following flags, comma- or
newline-separated:
| Flag | Description |
|---|---|
create_header_archive |
After the build completes, ZIP every *.glsl, *.h, *.hh, *.hpp, *.inc, and *.inl file found in the working directory and set the header_archive output. |
debug_symbols=[yes|no] |
Control whether debug symbols are included in the compiled binaries. Passed directly as debug_symbols= to SCons. |
generate_bundle=[yes|no] |
Generate a .app bundle after compilation. Relevant for macos and ios targets. Passed directly as generate_bundle= to SCons. |
ios_simulator=[yes|no] |
Build for the iOS Simulator instead of a physical device. Only meaningful when platform is ios. Passed directly as ios_simulator= to SCons. |
optimize=[speed_trace|speed|size|debug|none|custom] |
Set the compiler optimisation level. Passed directly as optimize= to SCons. See the Godot build tool docs for what each level means. |
- Download — fetches the Godot source tarball for the requested
version-flavorcombination fromhttps://github.com/godotengine/godot-builds/releases. - Extract — unpacks the
.tar.xzarchive into the working directory. - Set up SCons — installs SCons via
pip3. - Build — runs
scons platform=<p> target=<t> [arch=…] [options…]once for everyplatform×targetpair. - Header archive (optional) — if
create_header_archiveis set, collects all header files into a ZIP and sets theheader_archiveoutput.
Copy .env.example to .env and set your input values, then run:
npx @github/local-action . src/main.ts .envInput names follow the INPUT_<NAME> convention:
# .env
ACTIONS_STEP_DEBUG=true
INPUT_VERSION=4.4
INPUT_FLAVOR=stable
INPUT_PLATFORM=linuxbsd
INPUT_TARGET=editor
INPUT_ARCHITECTURE=auto
INPUT_OPTIONS=
INPUT_TIMEOUT=0npm installUpdate packages to the latest version allowed by the version range specified in
the package.json file.
npm updatenpm auditCheck the registry to see if any of the installed packages have newer versions available.
npm outdatedRemove "extraneous" packages—those that are installed in node_modules but no
longer listed in package.json
npm pruneSimplify the dependency tree by moving duplicated nested dependencies further up the hierarchy.
npm dedupeDisplay an ASCII tree of all installed packages and their dependencies.
npm list (or npm ls)
npm ls -g --depth=0 # to see only top-level global packagesCheck why a specific package is installed by visualizing the dependency chain leading to it.
npm explain <package> (formerly npm why)Run a series of diagnostic tests to ensure the npm installation and environment (like the cache and registry access) are working correctly.
npm doctorClear the internal npm cache, which can resolve "ghost" installation errors.
npm cache clean --forcePerform a "clean" install by deleting node_modules and strictly following the
package-lock.json file (Designed for CI environments).
npm ciCreate a symbolic link for a package being developed locally, allowing use in another project as if it were published.
npm linkPrint detailed metadata about a package from the registry without installing it, such as available versions or its documentation.
npm view <package-name>