This document describes the Woodpecker CI pipeline used to build, export, upload, and publish a TIC-80 game project.
The pipeline logic is almost entirely encapsulated within a Makefile, which is called by each pipeline step. This approach simplifies the CI configuration and keeps the build logic centralized.
The pipeline performs the following steps:
.tic and .html).Each step corresponds to a make ci-* target.
- name: version
image: alpine
commands:
- 'apk add --no-cache make'
- 'make ci-version'
What it does:
make.make ci-version, which reads the version from a Lua source file (inc/meta/meta.header.lua) and saves it to a .version file for subsequent steps to use.- name: lint
image: alpine
commands:
- 'apk add --no-cache make lua5.4 lua5.4-dev luarocks gcc musl-dev'
- 'ln -sf /usr/bin/lua5.4 /usr/bin/lua'
- 'ln -sf /usr/bin/luarocks-5.4 /usr/bin/luarocks'
- 'luarocks install luacheck'
- 'make ci-lint'
What it does:
luacheck.make ci-lint, which statically analyzes all Lua source files for syntax errors, unused variables, and other issues.- name: minify
image: alpine
commands:
- 'apk add --no-cache make lua5.4 curl'
- 'ln -sf /usr/bin/lua5.4 /usr/bin/lua'
- 'make ci-minify'
What it does:
curl.make ci-minify, which builds the project (concatenates source files) and then minifies the output.<project>.lua (minified) and <project>.original.lua (pre-minification backup for documentation generation).- name: docs
image: alpine
commands:
- 'apk add --no-cache make lua5.4 lua5.4-dev luarocks gcc musl-dev zip'
- 'ln -sf /usr/bin/lua5.4 /usr/bin/lua'
- 'ln -sf /usr/bin/luarocks-5.4 /usr/bin/luarocks'
- 'luarocks install ldoc'
- 'make ci-docs'
What it does:
ldoc, and zip.make ci-docs, which generates API documentation from the pre-minification source (<project>.original.lua) using ldoc.impostor-1.0.0-docs.zip) and creates an unversioned copy (impostor-docs.zip).- name: export
image: git.teletype.hu/internal/tic80pro:latest
environment:
XDG_RUNTIME_DIR: /tmp
commands:
- 'make ci-export'
What it does:
make ci-export, which reads the version from the .version file and exports the game. This generates:
.tic cartridge (e.g., impostor-1.0.0.tic)..html.zip web build (e.g., impostor-1.0.0.html.zip).impostor.tic, impostor.html.zip) for consistency.- name: artifact
image: alpine
environment:
DROPAREA_HOST: vps.teletype.hu
DROPAREA_PORT: 2223
DROPAREA_TARGET_PATH: /home/drop
DROPAREA_USER: drop
DROPAREA_SSH_PASSWORD:
from_secret: droparea_ssh_password
commands:
- 'apk add --no-cache make openssh-client sshpass'
- 'make ci-artifact'
What it does:
make and SSH tooling.make ci-artifact, which uploads the generated .lua, .tic, .html.zip, and -docs.zip files to a remote server using scp.Makefile target reads the necessary environment variables.- name: update
image: alpine
environment:
UPDATE_SERVER: https://games.vps.teletype.hu
UPDATE_SECRET:
from_secret: update_secret_key
commands:
- 'apk add --no-cache make curl'
- 'make ci-update'
What it does:
make and curl.make ci-update, which sends an HTTP curl request to an update server.After a successful run:
.lua, .tic, .html.zip, -docs.zip) are uploaded to the server.This pipeline enables fully automated TIC-80 releases where the entire build and release logic is managed by the project's Makefile.
https://git.teletype.hu/tools/tic80-tools/src/branch/master/example-woodpecker.yaml