win-x86, win-x64, linux-x64 and mac-universal targets, validated on the pong pipeline: Makefile binaries/ci-binaries targets, desktop export presets, ci-binaries step in the Woodpecker example. Mac is a single universal (intel + arm) build with built-in ad-hoc codesign and needs ETC2 ASTC texture import enabled in project.godot. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3.4 KiB
godot-tools
CI/CD templates for Godot (4.x) game projects, in the same spirit as ebitengine-tools and tic80-tools.
example-makefile.make— project Makefile: local dev targets (build,run,web,export,watch,clean), the desktop binary targets (binaries,binary-win-x86,binary-win-x64,binary-linux-x64,binary-mac-universal) plus the Woodpecker pipeline targets (ci-version,ci-export,ci-binaries,ci-upload,ci-update).example-woodpecker.yaml— Woodpecker pipeline: version → build (headless web export + desktop binaries in thebarichello/godot-ciimage) → upload (scp to the droparea) → update (calls the teletypegames/updateendpoint withplatform=godot).example-export_presets.cfg—export_presets.cfgwith the Web preset the Makefile exports plus the desktop presets (Windows x86, Windows x64, Linux x64, Mac universal). Web threads are disabled (variant/thread_support=false, Godot 4.3+) so the build runs without COOP/COEP (cross-origin isolation) headers.example-tasks.json— VS Code.vscode/tasks.jsonwith the common dev tasks: Run (godot --path ., default build task,Cmd+Shift+B), Edit, Export Web and Make build.
Usage in a game repo
-
Copy
example-makefile.maketoMakefileand setPROJECT(the web build is packaged as$(PROJECT)-$(VERSION).html.zip). -
Copy
example-export_presets.cfgtoexport_presets.cfg(or merge the presets into your existing file). Keep the preset names in sync with the Makefile (EXPORT_PRESETfor web, theB_PRESETvalues of thebinary-*targets for desktop), and setapplication/bundle_identifierin the Mac preset to your project. For the universal mac export enable ETC2 ASTC texture import inproject.godot:[rendering] textures/vram_compression/import_etc2_astc=true -
Copy
example-woodpecker.yamlto.woodpecker.yamland add thedroparea_ssh_password/update_secret_keysecrets in Woodpecker. Match thegodot-builderimage tag to the Godot version the project is made with (e.g.4.6) — the underlyingbarichello/godot-ciimage ships the matching export templates. -
Copy
example-tasks.jsonto.vscode/tasks.json.
The pipeline uploads $(PROJECT)-$(VERSION).html.zip and the desktop
binary zips ($(PROJECT)-$(VERSION)-<target>.zip, targets: win-x86,
win-x64, linux-x64, mac-universal) to the droparea, then triggers
/update?platform=godot&name=$(PROJECT)&version=$(VERSION), which
attaches them to the release as ReleaseAssets. Godot cross-exports all
desktop platforms from the linux CI image with the official export
templates; mac is a single universal (intel + arm) build with Godot's
built-in ad-hoc codesign — per-arch mac export would need custom-built
templates.
Builder image
builder.Dockerfile wraps barichello/godot-ci (editor + web export
templates) with make/zip preinstalled as
git.teletypegames.org/internal/godot-builder, so the build step no longer
runs apt-get on every run. The tag tracks the Godot version:
docker build --platform linux/amd64 -f builder.Dockerfile \
--build-arg GODOT_VERSION=4.6 \
-t git.teletypegames.org/internal/godot-builder:4.6 .
docker push git.teletypegames.org/internal/godot-builder:4.6
Detailed documentation lives on the wiki: /development/godot.