binary assets

This commit is contained in:
2026-08-02 18:51:02 +02:00
parent 6661f957c6
commit 56054a21b4
4 changed files with 88 additions and 19 deletions
+22 -11
View File
@@ -4,13 +4,14 @@ CI/CD templates for [Ebitengine](https://ebitengine.org) (Go) game
projects, in the same spirit as [tic80-tools](../tic80-tools).
- `example-makefile.make` — project Makefile: local dev targets
(`build`, `wasm`, `export`, `watch`, `clean`) plus the Woodpecker
pipeline targets (`ci-version`, `ci-export`, `ci-upload`,
`ci-update`).
(`build`, `wasm`, `export`, `watch`, `clean`), native binary targets
(`binaries`, `binary-win-x86`, `binary-win-x64`, `binary-linux-x64`)
plus the Woodpecker pipeline targets (`ci-version`, `ci-export`,
`ci-binaries`, `ci-upload`, `ci-update`).
- `example-woodpecker.yaml` — Woodpecker pipeline: version → export
(Go, `GOOS=js GOARCH=wasm`) → upload (scp to the droparea) → update
(calls the teletypegames `/update` endpoint with
`platform=ebitengine`).
(Go, `GOOS=js GOARCH=wasm`) → binaries (native desktop zips) →
upload (scp to the droparea) → update (calls the teletypegames
`/update` endpoint with `platform=ebitengine`).
- `example-tasks.json` — VS Code `.vscode/tasks.json` with the common
dev tasks: **Run** (`go run .`, default build task, `Cmd+Shift+B`),
**Build & Run**, **Build WASM** and **Make build**.
@@ -26,16 +27,26 @@ projects, in the same spirit as [tic80-tools](../tic80-tools).
3. Copy `example-tasks.json` to `.vscode/tasks.json` and replace the
binary name (`ebitenginedemo`) with `$(PROJECT)`.
The pipeline uploads `$(PROJECT)-$(VERSION).html.zip` to the droparea,
then triggers
The pipeline uploads `$(PROJECT)-$(VERSION).html.zip` plus the native
binary zips (`$(PROJECT)-$(VERSION)-<target>.zip`, currently `win-x86`,
`win-x64`, `linux-x64`) to the droparea, then triggers
`/update?platform=ebitengine&name=$(PROJECT)&version=$(VERSION)`.
The updater picks up the binary zips by naming convention and attaches
them to the release as assets (see `teletypegames/NOTES_BINARY_PLAN.md`).
Binary zip layout: a single root folder
(`$(PROJECT)-$(VERSION)-<target>/`) containing the executable (plus
LICENSE/README.md when present). The zips are created with unix `zip`,
so the executable bit survives on the linux binary. mac targets need a
mac runner (or osxcross) and are not part of the pipeline yet.
## Builder image
`builder.Dockerfile` bakes the pipeline's build-step dependencies
(Go + git/make/zip/curl) into
`git.teletypegames.org/internal/ebitengine-builder`, so the build step
no longer runs `apk add` on every run:
(Go + git/make/zip/curl/jq and the X11/GL/ALSA dev libraries needed by
the cgo `linux-x64` build) into
`git.teletypegames.org/internal/ebitengine-builder`. Debian-based so
the linux binary links against glibc:
```sh
docker build --platform linux/amd64 -f builder.Dockerfile \