LÖVE (also known as Love2D) is a framework for making 2D games in Lua. It is lightweight, flexible, and well-suited for rapid iteration, prototyping, and small to medium-sized games.
Website: https://love2d.org
This Makefile provides a simple, reproducible workflow for building Love2D projects for both native distribution and web-based execution via
love.js. It is designed for indie game development with automated version management and CI/CD deployment support.
The workflow is based on four core ideas:
.love files.love package with love.jsmetadata.json or git commit hashThis approach keeps the build process simple while supporting both desktop and web platforms.
| Variable | Description | Default |
|---|---|---|
PROJECT |
Project name (used in output filenames) | love2ddemo |
BIN_DIR |
Directory for build-time checks | bin |
DIST_DIR |
Directory for packaged artifacts | dist |
WEB_DIR |
Directory for web-specific files | dist/web |
LOVE_NAME |
Name of the generated .love file | love2ddemo.love |
VERSION_FILE |
File storing version for CI/CD | .version |
make build
bin/ directory exists.lua files using luacmake love
.love archive.git, Makefile, and the dist/ folderdist/love2ddemo.lovemake web
love target to be run.love.js engine from a remote repositorydist/web/index.html and player.js to correctly load the game and reference the proper project pathsmake export VERSION=1.0.0
VERSION variable..love package and the web versionlove2ddemo-1.0.0.love.ziplove2ddemo-1.0.0.html.zipmake watch
.lua filesbuild target on any changefswatch to be installedmake clean
bin/ directorydist/ directorymake ci-versionmetadata.json (if exists) or uses git short commit hashmain or master, prefixes version as dev-<version>-<branch>.version file for use in subsequent CI stepsmake ci-export.version filemake export with the stored VERSIONmake ci-upload.version filemetadata.json via SCP to a remote serverDROPAREA_SSH_PASSWORD - SSH passwordDROPAREA_PORT - SSH portDROPAREA_USER - SSH usernameDROPAREA_HOST - Server hostnameDROPAREA_TARGET_PATH - Target directory on servermake ci-update.version filelove and love-web platformsUPDATE_SERVER - Update server URLUPDATE_SECRET - Authentication secret| File | Description |
|---|---|
dist/love2ddemo.love |
Standard Love2D package |
love2ddemo-<version>.love.zip |
Versioned ZIP of the .love package |
love2ddemo-<version>.html.zip |
Versioned ZIP of the web build |
love2ddemo-<version>.metadata.json |
Project metadata for distribution |
makeluac (for syntax checking)zip (for packaging archives)curl (for downloading love.js)unzip (for extracting love.js)sed (for patching web files)fswatch (only for watch mode)sshpass and scp (for ci-upload target)jq (for parsing metadata.json in ci-version)git (for version fallback and branch detection in ci-version)This document describes the Woodpecker CI pipeline used to build, export, upload, and publish a Love2D 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:
metadata.json or git commit hash..love file and creates a web-compatible bundle using love.js.Each step corresponds to a make ci-* target.
- name: version
image: alpine
commands:
- apk add --no-cache git make jq
- make ci-version
What it does:
git, make, and jq for processing metadata.make ci-version, which:
metadata.json (if exists) or falls back to git short commit hash.main or master), prefixes the version as dev-<version>-<branch>..version file for subsequent steps to use.- name: export
image: alpine
commands:
- apk add --no-cache zip make curl unzip
- make ci-export
What it does:
zip, make, curl, and unzip for fetching dependencies and packaging.make ci-export, which:
.version file..love file.love.js to create a web-compatible version of the game..love file and the web folder into ZIP archives: love2ddemo-<version>.love.zip and love2ddemo-<version>.html.zip.- name: upload
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-upload
What it does:
make and SSH tooling (openssh-client, sshpass).make ci-upload, which:
.version file.metadata.json to love2ddemo-<version>.metadata.json..love.zip, .html.zip, and .metadata.json files to a remote server using scp.- 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:
.version file.love and one for love-web) with query parameters:secret - Authorization tokenname - Project name (love2ddemo)platform - Platform identifier (love or love-web)version - Version from .version fileExample request:
https://games.vps.teletype.hu/update?secret=<SECRET>&name=love2ddemo&platform=love&version=1.0.0
After a successful run:
.love distribution and a web-ready bundle.This pipeline enables fully automated Love2D releases where the entire build and release logic is managed by the project's Makefile.