Replace the pipeline template with a marker: the config is served by the update server

This commit is contained in:
2026-08-06 07:59:50 +02:00
parent 40b6cbb38e
commit bb4d13558f
3 changed files with 20 additions and 85 deletions
+14 -13
View File
@@ -7,13 +7,11 @@ and [tic80-tools](../tic80-tools).
- `example-makefile.make` — project Makefile: local dev targets - `example-makefile.make` — project Makefile: local dev targets
(`build`, `run`, `web`, `export`, `watch`, `clean`), the desktop (`build`, `run`, `web`, `export`, `watch`, `clean`), the desktop
binary targets (`binaries`, `binary-win-x86`, `binary-win-x64`, binary targets (`binaries`, `binary-win-x86`, `binary-win-x64`,
`binary-linux-x64`, `binary-mac-universal`) plus the Woodpecker `binary-linux-x64`, `binary-mac-universal`).
pipeline targets (`ci-version`, `ci-export`, `ci-binaries`, - `example-woodpecker.yaml` — a one-line marker (`platform: godot`): the
`ci-upload`, `ci-publish`). full pipeline (version → build → upload → publish) is served by the update server's Woodpecker
- `example-woodpecker.yaml` — Woodpecker pipeline: version → build configuration extension — preview it with
(headless web export + desktop binaries in the `barichello/godot-ci` `curl "https://teletypegames.org/build/config?platform=godot"`.
image) → upload (HTTP POST to `/build/upload`) → update (calls the
teletypegames `/build/publish` endpoint with `platform=godot`).
- `example-export_presets.cfg``export_presets.cfg` with the **Web** - `example-export_presets.cfg``export_presets.cfg` with the **Web**
preset the Makefile exports plus the desktop presets (**Windows preset the Makefile exports plus the desktop presets (**Windows
x86**, **Windows x64**, **Linux x64**, **Mac universal**). Web x86**, **Windows x64**, **Linux x64**, **Mac universal**). Web
@@ -40,14 +38,17 @@ and [tic80-tools](../tic80-tools).
textures/vram_compression/import_etc2_astc=true textures/vram_compression/import_etc2_astc=true
``` ```
3. Copy `example-woodpecker.yaml` to `.woodpecker.yaml` and add the 3. Copy `example-woodpecker.yaml` to `.woodpecker.yaml` (a one-line marker — the
`update_secret_key` secret in Woodpecker. pipeline itself is served by the update server; add `name:` when the
Match the `godot-builder` image tag to the Godot version the software name differs from the repo name) and add the
project is made with (e.g. `4.6`) — the underlying `application_token` secret in Woodpecker (an ApplicationToken with
`barichello/godot-ci` image ships the matching export templates. the `update` + `upload` scopes, created in the admin).
The `godot-builder` image tag (and with it the export-template
version) is set server-side in the update server's `ci_platforms`
config, not per repo.
4. Copy `example-tasks.json` to `.vscode/tasks.json`. 4. Copy `example-tasks.json` to `.vscode/tasks.json`.
The pipeline uploads `$(PROJECT)-$(VERSION).html.zip` and the desktop The served pipeline uploads `$(PROJECT)-$(VERSION).html.zip` and the desktop
binary zips (`$(PROJECT)-$(VERSION)-<target>.zip`, targets: `win-x86`, binary zips (`$(PROJECT)-$(VERSION)-<target>.zip`, targets: `win-x86`,
`win-x64`, `linux-x64`, `mac-universal`) via `/build/upload`, then triggers `win-x64`, `linux-x64`, `mac-universal`) via `/build/upload`, then triggers
`/build/publish?platform=godot&name=$(PROJECT)&version=$(VERSION)`, which `/build/publish?platform=godot&name=$(PROJECT)&version=$(VERSION)`, which
+1 -40
View File
@@ -11,8 +11,6 @@ DIST_DIR = dist
WEB_DIR = $(DIST_DIR)/web WEB_DIR = $(DIST_DIR)/web
OUTPUT_ZIP = $(PROJECT)-$(VERSION).html.zip OUTPUT_ZIP = $(PROJECT)-$(VERSION).html.zip
VERSION_FILE = .version
all: build all: build
build: build:
@@ -102,41 +100,4 @@ watch:
clean: clean:
rm -rf $(DIST_DIR) .godot rm -rf $(DIST_DIR) .godot
ci-version: .PHONY: all build run web export watch clean binaries binary-win-x86 binary-win-x64 binary-linux-x64 binary-mac-universal binary-build binary-build-mac
@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-binaries:
@VERSION=$$(cat $(VERSION_FILE)); \
$(MAKE) binaries VERSION=$$VERSION
ci-upload:
@VERSION=$$(cat $(VERSION_FILE)); \
FILE="$(PROJECT)-$$VERSION.html.zip"; \
META_SRC="metadata.json"; \
META_DST="$(PROJECT)-$$VERSION.metadata.json"; \
BINS=$$(ls $(PROJECT)-$$VERSION-*.zip 2>/dev/null || true); \
cp $$META_SRC $$META_DST; \
for f in $$FILE $$META_DST $$BINS; do \
curl -fsS -H "X-Update-Secret: $(UPDATE_SECRET)" \
-F "file=@$$f" \
"$(UPDATE_SERVER)/build/upload?name=$(PROJECT)&version=$$VERSION" || exit 1; \
done
ci-publish:
@VERSION=$$(cat $(VERSION_FILE)); \
curl -fsS -X POST -H "X-Update-Secret: $(UPDATE_SECRET)" "$(UPDATE_SERVER)/build/publish?name=$(PROJECT)&platform=godot&version=$$VERSION"
.PHONY: all build run web export watch clean binaries binary-win-x86 binary-win-x64 binary-linux-x64 binary-mac-universal binary-build binary-build-mac ci-version ci-export ci-binaries ci-upload ci-publish
+5 -32
View File
@@ -1,32 +1,5 @@
steps: # One-line marker: the full pipeline is served by the update server's
- name: version # Woodpecker configuration extension. Preview it with:
image: alpine # curl "https://teletypegames.org/build/config?platform=godot"
commands: platform: godot
- apk add --no-cache git make jq # name: mygame # only when the software name differs from the repo name
- make ci-version
- name: build
image: git.teletypegames.org/internal/godot-builder:4.6
commands:
- make ci-export
- make ci-binaries
- name: artifact
image: alpine
environment:
UPDATE_SERVER: https://teletypegames.org
UPDATE_SECRET:
from_secret: update_secret_key
commands:
- apk add --no-cache make curl
- make ci-upload
- name: publish
image: alpine
environment:
UPDATE_SERVER: https://teletypegames.org
UPDATE_SECRET:
from_secret: update_secret_key
commands:
- apk add --no-cache make curl
- make ci-publish