add CI/CD pipeline tooling (Makefile, Woodpecker, metadata)
ci/woodpecker/manual/woodpecker Pipeline was successful

Adapted from tools_build/phaser-tools for the Vite + TypeScript setup:
the web bundle comes from npm ci + npm run build instead of source
concatenation, otherwise the standard ci-version/ci-export/ci-upload/
ci-update flow applies (platform=phaser).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-01 23:06:33 +02:00
co-authored by Claude Fable 5
parent 8827575964
commit 25b3314e1b
6 changed files with 150 additions and 1 deletions
+3
View File
@@ -3,3 +3,6 @@ dist
.DS_Store
*.local
.claude
.version
*.html.zip
*.metadata.json
+28
View File
@@ -0,0 +1,28 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Serve",
"type": "shell",
"command": "make serve",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Build Web",
"type": "shell",
"command": "make web",
"problemMatcher": []
},
{
"label": "Make build",
"type": "shell",
"command": "make build"
}
]
}
+34
View File
@@ -0,0 +1,34 @@
steps:
- name: version
image: alpine
commands:
- apk add --no-cache git make jq
- make ci-version
- name: build
image: git.teletypegames.org/internal/phaser-builder:latest
commands:
- make ci-export
- 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
- name: update
image: alpine
environment:
UPDATE_SERVER: https://teletypegames.org
UPDATE_SECRET:
from_secret: update_secret_key
commands:
- apk add --no-cache make curl
- make ci-update
+75
View File
@@ -0,0 +1,75 @@
# -----------------------------------------
# Makefile Phaser (Vite + TypeScript) project builder
# -----------------------------------------
PROJECT = trickster-tiles
DIST_DIR = dist
OUTPUT_ZIP = $(PROJECT)-$(VERSION).html.zip
VERSION_FILE = .version
all: build
node_modules: package.json package-lock.json
npm ci
build: node_modules
@echo "==> Type-checking + bundling (tsc + vite)"
npm run build
web: build
serve: node_modules
@echo "==> Serving production build on http://localhost:4173"
npm run preview
dev: node_modules
npm run dev
export: web
@if [ -z "$(VERSION)" ]; then \
echo "ERROR: VERSION not set!"; exit 1; \
fi
@echo "==> Packaging web build for $(VERSION)"
cd $(DIST_DIR) && zip -r ../$(OUTPUT_ZIP) .
@echo "==> Cleaning temporary files"
rm -rf $(DIST_DIR)
watch:
fswatch -o src | while read; do make build; done
clean:
rm -rf $(DIST_DIR)
ci-version:
@if [ -f metadata.json ]; then \
VERSION=$$(jq -r '.version' metadata.json); \
else \
VERSION=$$(git rev-parse --short HEAD); \
fi; \
BRANCH=$$(git rev-parse --abbrev-ref HEAD); \
if [ "$$BRANCH" != "main" ] && [ "$$BRANCH" != "master" ]; then \
VERSION="dev-$$VERSION-$$BRANCH"; \
fi; \
echo $$VERSION > $(VERSION_FILE)
ci-export:
@VERSION=$$(cat $(VERSION_FILE)); \
$(MAKE) export VERSION=$$VERSION
ci-upload:
@VERSION=$$(cat $(VERSION_FILE)); \
FILE="$(PROJECT)-$$VERSION.html.zip"; \
META_SRC="metadata.json"; \
META_DST="$(PROJECT)-$$VERSION.metadata.json"; \
cp $$META_SRC $$META_DST; \
sshpass -p "$(DROPAREA_SSH_PASSWORD)" scp -o StrictHostKeyChecking=no -P $(DROPAREA_PORT) \
$$FILE $$META_DST \
$(DROPAREA_USER)@$(DROPAREA_HOST):$(DROPAREA_TARGET_PATH)/
ci-update:
@VERSION=$$(cat $(VERSION_FILE)); \
curl "$(UPDATE_SERVER)/update?secret=$(UPDATE_SECRET)&name=$(PROJECT)&platform=phaser&version=$$VERSION"
.PHONY: all build web serve dev export watch clean ci-version ci-export ci-upload ci-update
+9
View File
@@ -0,0 +1,9 @@
{
"name": "trickster-tiles",
"title": "Trickster Tiles",
"author": "Teletype Games",
"desc": "A small pixel-art platformer: hop, jump, and outwit moving spikes and disappearing tiles across 10 levels. Made with Phaser 3.",
"site": "https://git.teletypegames.org/games/trickster-tiles",
"license": "MIT License",
"version": "0.1.0"
}
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "trickster-tiles",
"private": true,
"version": "0.0.0",
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "vite",