2.6 KiB
tic80-tools
CI/CD templates for TIC-80 (Lua) game projects.
example-makefile.make— project Makefile: local dev targets (build,minify,binaries,watch,lint,docs,import_assets,export_assets,clean,install_precommit_hook).example-woodpecker.yaml— a one-line marker (platform: tic80): the full pipeline (version → lint → minify → docs → export → binaries → artifact → publish) is served by the update server's Woodpecker configuration extension — preview it withcurl "https://teletypegames.org/build/config?platform=tic80".example-tasks.json— VS Code.vscode/tasks.jsonwith the common dev tasks: Run TIC80 (default build task,Cmd+Shift+B), Build & Run TIC80, Export assets and Make build.
Usage in a game repo
- Copy
example-makefile.maketoMakefileand setPROJECT(the cartridge is built as$(PROJECT).luafrom the file list in$(PROJECT).inc). - Copy
example-woodpecker.yamlto.woodpecker.yaml(a one-line marker — the pipeline itself is served by the update server; addname:when the software name differs from the repo name) and add theapplication_tokensecret in Woodpecker (an ApplicationToken with theupdate+uploadscopes, created in the admin). - Copy
example-tasks.jsonto.vscode/tasks.jsonand replace the cart name (impostor.lua) with$(PROJECT).lua.
The served pipeline uploads $(PROJECT)-$(VERSION).lua, .tic, .html.zip,
-docs.zip and the native player zips (-win-x64.zip,
-linux-x64.zip, -mac-x64.zip) via /build/upload, then triggers
/build/publish?platform=tic80&name=$(PROJECT)&version=$(VERSION). The API's
BinaryAttachment concern picks up the <name>-<version>-<slug>.zip
files automatically and registers them as win_x64 / linux_x64 /
mac_x64 release assets.
Native binaries
make binaries VERSION=x.y runs TIC-80's export win / linux / mac,
which produces self-contained players with the cart baked in. Two
things to know:
- The player templates are downloaded from tic80.com at export time, so the CI step needs network access (the Woodpecker steps have it — the same way the artifact step reaches the API).
- All upstream players are x86-64 — the mac binary is Intel-only
(runs via Rosetta on Apple Silicon), hence the
mac-x64slug.
Each binary is zipped with a single $(PROJECT)-$(VERSION)-<slug>/
root folder; the zip is created on unix so the executable bit
survives.
Detailed documentation lives on the wiki: /development/tic80.