npx skills add ...
npx skills add jame581/godotprompter --skill export-pipeline
Use when exporting and distributing Godot games — export presets, platform settings, CI/CD with GitHub Actions
npx skills add jame581/godotprompter --skill export-pipeline
All examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, C# follows where applicable.
Related skills: godot-testing for CI/CD test integration, godot-optimization for pre-export performance checks, responsive-ui for platform-specific resolution settings, mobile-development for Android/iOS export specifics.
Open Project → Export, click Add…, and select the target platform. Each preset maps to one entry in export_presets.cfg. You can create multiple presets for the same platform (e.g., a debug build and a release build for Windows).
Required one-time setup per platform:
Godot writes export_presets.cfg to the project root. Commit this file — it is safe and contains no secrets. Secrets (codesigning passwords, keystore passwords) must never be committed; use environment variables instead.
Example preset structure (Windows release):
Godot regenerates
export_presets.cfgon every editor save. Do not hand-edit it while the editor is open.
⚠️ Changed in Godot 4.7: The "runnable" flag moved out of export presets —
runnable=(shown in the example above for 4.3–4.6) is no longer a per-preset property inexport_presets.cfg; the editor now tracks which preset is runnable separately. Don't be surprised when the line disappears from the file after saving in a 4.7 editor. See GH-114930.
Godot 4.7+: Sparse PCK exports (patch packs) support encrypting the file index, complementing the existing
encrypt_pck/encrypt_directorypreset options. (GH-113920)
| Platform | Key Setting / Consideration |
|---|---|
| Windows | Set application/icon (.ico file). Codesigning requires a .pfx certificate; set codesign/enable=true and supply codesign/identity + codesign/password via env vars. Without codesigning, Windows SmartScreen will warn users. |
| Linux | No codesigning required. After export, run chmod +x MyGame.x86_64 on the binary. Ship as a tarball or AppImage for distribution. |
| macOS | Requires notarization for Gatekeeper to allow launch without warning. Set codesign/enable=true and notarization/enable=true. Provide the codesign/identity (Apple Developer ID). The Info.plist entries (bundle ID, version, display name, privacy usage descriptions) are set under application/* options in the preset. Notarization is done post-export via xcrun notarytool. |
| Web | Requires SharedArrayBuffer for multi-threading — the web server must send Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp headers. Disable threads (rendering/threads/thread_model=0) if hosting on a server you cannot configure. Exported output is a .html + .js + .wasm + .pck bundle. |
| Android | Requires a keystore for release signing. Set keystore/release to the .keystore path and supply keystore/release_user + keystore/release_password via env vars. Declare permissions in the preset under permissions/*. Set package/unique_name to a reverse-DNS string (e.g., com.studio.mygame). |
| iOS | Requires a valid Apple provisioning profile (.mobileprovision). Set application/bundle_identifier, codesign/identity, and application/provisioning_profile. Distribution builds require an App Store distribution certificate. |
Run Godot in headless mode to export without opening the GUI. This is the standard approach for CI/CD.
Use --export-pack when you only want to ship updated game data alongside a fixed engine binary (e.g., DLC or patch distribution):
Godot 4.7+: When exporting patch PCKs for Android, an APK or AAB can be provided as the base pack, extending PCK-patching workflows to Android builds. (GH-116553)
PCKPacker.add_file_from_buffer(target_path, data, encrypt = false) packs a PackedByteArray straight into a PCK — no temp file on disk — which is handy when generating patch content from a build script:
| Flag | Purpose |
|---|---|
--headless | No display server; required for server/CI environments |
--export-release "Preset Name" path | Export using release template |
--export-debug "Preset Name" path | Export using debug template |
--export-pack "Preset Name" path | Export .pck resource pack only |
--quit-after N | Quit after N milliseconds (rarely needed for export) |
The preset name in the CLI flag must match
name=inexport_presets.cfgexactly, including capitalisation and spaces.
Run godot --headless --export-release inside a GitHub Actions matrix that builds Windows, Linux, and Web artifacts on every push and tagged release. Use chickensoft-games/setup-godot@v2 to install the engine + export templates (set use-dotnet: true for C# projects). Inject the version from git describe before export so application/config/version is correct in the binary.
See references/ci-cd-github-actions.md for the full .github/workflows/export.yml with matrix presets, artifact upload, and Linux executable bit handling.
Set the version in application/config/version and read it at runtime with ProjectSettings.get_setting(). To inject a version from git at export time, run an EditorScript that calls git describe --tags --always --dirty through OS.execute() before the export step. Tags follow Semantic Versioning (v1.2.3).
See references/versioning.md for the runtime version label, the
inject_version.gdtool, and the tag convention.
itch.io uses the Butler CLI: butler push build/windows/ my-studio/my-game:windows --userversion "$VERSION". Channel names follow a convention (windows, linux, macos, web, android). In CI, the Ayowel/butler-to-itch@v1 action pushes all artifacts at once; store the API key as the BUTLER_API_KEY secret.
Steam requires three pieces: the Steamworks SDK (non-redistributable, keep out of public repos), the GodotSteam addon for engine bindings, and depot configurations driven by steamcmd +run_app_build app_build.vdf. Steam integration is outside the export pipeline itself.
See references/distribution-itch-steam.md for full butler install instructions, channel naming table, the deploy-itch GitHub Actions job, and the Steam component breakdown.
Godot 4.5 introduces the Shader Baker, an export-time tool that pre-compiles shaders for the target platform. Without it, shaders compile at runtime on first use, causing visible hitches when new materials are first rendered in-game. The Shader Baker eliminates this stutter by doing the work at export time.
In Project → Export, open a preset and locate the Shader Baker section. Enable it and configure target backends (Vulkan, D3D12, Metal, GLES3) as needed.
The Shader Baker increases export build time but has no effect on game download size or runtime memory. The pre-compiled cache is embedded in the
.pckfile.
| Platform | Backend | Benefit |
|---|---|---|
| macOS / Apple Silicon | Metal | Up to 20x load time reduction on complex shader graphs |
| Windows | D3D12 | Eliminates D3D12 pipeline state compilation stalls |
| Mobile (Android/iOS) | GLES3 | Faster first-render on mid-range hardware |
| Linux / Windows | Vulkan | Moderate improvement; Vulkan caches vary by driver |
The Shader Baker runs automatically when exporting via the editor GUI or CLI (--export-release). No extra steps are needed in CI — it is controlled by the preset configuration, not a separate CLI flag.
Before Godot 4.5, modifying .exe metadata (version info, icon, copyright, company name) on Windows required the external rcedit tool. Godot 4.5 handles all of this natively at export time — no rcedit download or configuration needed.
| Export Preset Field | Effect on .exe |
|---|---|
application/file_version | File version shown in Properties → Details |
application/product_version | Product version |
application/company_name | Company name |
application/product_name | Product name |
application/file_description | Description |
application/copyright | Legal copyright |
application/icon | .ico file embedded as the executable icon |
application/* fields under Application in the preset options..exe directly.Removing rcedit from CI: If your project previously downloaded
rceditin CI and called it as a post-export step, you can remove that step. The fields in the export preset replace it entirely for Godot 4.5+.
export_presets.cfg committed to version controlname= that matches the CLI --export-release argument exactlymkdir -p)chmod +x)application/config/version in project.godot is populated at export time from a git tagCOOP + COEP headers if threads are enabled.exe metadata (version, icon, company name) set in the export preset — rcedit no longer required (Godot 4.5+)godot --headless --export-release "Windows Desktop" build/windows/MyGame.exegodot --headless --export-debug "Windows Desktop" build/windows/MyGame.exegodot --headless --export-pack "Windows Desktop" build/windows/MyGame.pckvar build_info: String = "v" + ProjectSettings.get_setting("application/config/version", "dev")
var packer := PCKPacker.new()
packer.pck_start("user://patch_1.pck")
packer.add_file_from_buffer("res://data/build_info.txt", build_info.to_utf8_buffer())
packer.flush()string buildInfo = "v" + ProjectSettings.GetSetting("application/config/version", "dev").AsString();
var packer = new PckPacker();
packer.PckStart("user://patch_1.pck");
packer.AddFileFromBuffer("res://data/build_info.txt", buildInfo.ToUtf8Buffer());
packer.Flush();# Shader Baker runs as part of normal export (no extra flag needed).
godot --headless --export-release "Windows Desktop" build/windows/MyGame.exe