Skip to content

Release by hand: the bitmap image on ghcr.io and a terminal zip, on snapshot versions and Gradle 9.9.0 - #55

Merged
lagergren merged 5 commits into
mainfrom
lagergren/release-workflow
Nov 7, 2026
Merged

lagergren merged 5 commits into
mainfrom
lagergren/release-workflow

Conversation

@lagergren

@lagergren lagergren commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

What a release is

One version, one tag vX.Y.Z, and one GitHub release with:

  • The bitmap web game as the image ghcr.io/lagergren/rylween:X.Y.Z (and :latest), for linux/amd64 and linux/arm64, built from deploy/docker/Dockerfile.bitmap-production, the same image ./deploy.sh builds.
  • The ANSI terminal game as rylween-terminal-X.Y.Z.zip: unzip it and run bin/rylween (Java 25 or newer).
  • A compose.yaml that pulls that image, so a host needs no checkout.
  • The source archives GitHub attaches, and generated release notes.

Versions

rylween.version in gradle.properties is now the only place the version is set. The root build fails for anything but X.Y.Z or X.Y.Z-SNAPSHOT, and the docs no longer name a version. main carries the next patch release's snapshot, starting at 0.9.2-SNAPSHOT.

Releasing

./gradlew releaseDist                               # needs gh, logged in
./gradlew releaseDist -Prylween.release.dryRun=true # pushes and publishes nothing

releaseDist starts .github/workflows/release.yml on main. That workflow only ever starts by hand. It:

  1. refuses a version without -SNAPSHOT, or one already tagged,
  2. runs the CI checks (ci.yml is now also a reusable workflow),
  3. commits X.Y.Z as "Release X.Y.Z" and tags it,
  4. builds and smoke-tests the zip (its title menu must show vX.Y.Z) and the image (it must answer and log version=X.Y.Z),
  5. pushes the image for both platforms,
  6. commits X.Y.(Z+1)-SNAPSHOT, and pushes both commits to main together with the tag,
  7. publishes the GitHub release.

setReleaseVersion and setNextSnapshotVersion make the two version moves; they live in build-logic. For a minor or major release, first set the matching snapshot in a PR.

Before the first release

main takes only PRs, and the workflow's own token cannot bypass that. So the workflow pushes over SSH with a deploy key, which needs a one-time setup:

ssh-keygen -t ed25519 -N '' -C 'rylween release workflow' -f rylween-release-key
gh repo deploy-key add rylween-release-key.pub --repo lagergren/rylween --allow-write --title 'Release workflow'
gh secret set RELEASE_DEPLOY_KEY --repo lagergren/rylween < rylween-release-key
rm rylween-release-key rylween-release-key.pub

Then add Deploy keys to the bypass list of the "Require PRs and CI on main" ruleset (Settings → Rules → Rulesets).

A dry run needs neither. GitHub only lets a workflow start by hand once the workflow file is on the default branch, so the first dry run can happen after this merges. After the first real release, check that the rylween package on ghcr.io is public.

Also in this PR

  • Smaller terminal install: the terminal launcher, installed and in the zip, runs with a copy of :game's jar without the 147 MB of bitmap paintings it never shows. The zip goes from 180 MB to 32 MB.
  • Image builder: the bitmap image's builder stage runs on the build platform. Gradle's output is platform-independent, so the arm64 image needs no emulation.
  • Gradle 9.9.0.
  • Dependency bumps: JLine 4.5.0, Playwright 1.64.0, PMD 7.29.0, Node.js 26.13.0 (current LTS), TypeScript 7.0.2, versions plugin 0.67.0, version-catalog-update 1.1.2.
    • TypeScript 7 dropped "module": "none" and widened HTMLElement.hidden, so tsconfig.json uses es2020 with an explicit rootDir, and three popover toggles read hidden through Boolean(). The generated JavaScript is otherwise identical.
    • Kotlin stays on 2.4.21: the 2.5.0 in the update report is a beta.
    • Node.js 26's Linux binaries need libatomic, which the JDK image leaves out, so the image's builder stage installs it. The GitHub runners already have it.

Testing

  • CI checks: forced full runs (--rerun-tasks --no-build-cache --warning-mode all) on Gradle 9.8.1, on 9.9.0, and after the dependency bumps. All green, 294 tests, none skipped. The warnings were identical across runs: only the existing JDK sun.misc.Unsafe notices. No Gradle deprecations.
  • Browser smoke: checkBitmapBrowserSmoke passes with Playwright 1.64 on the TypeScript 7 client.
  • Version tasks: setReleaseVersion and setNextSnapshotVersion move the version correctly and refuse the wrong starting version. A malformed version fails the build.
  • releaseDist: checked against a stub gh. It refuses a release version before calling gh.
  • Terminal zip: unpacked and run as the workflow does. The title shows the version, saves and logs go to ~/.rylween/data, and --build is refused. The checkRuntime* checks and runtime tests pass against the slim launcher.
  • Image: built for linux/amd64 and linux/arm64 with Podman; the builder stage ran on the native platform. The arm64 image answers and logs its version.
  • Image after the bumps: rebuilt with Podman. npm and TypeScript 7 run inside it, and the image serves the TypeScript 7 client.
  • Release compose.yaml: generated with yq as the workflow does; Compose resolves it to the pinned image.
  • Workflows: pass actionlint.

…al game as a zip

rylween.version in gradle.properties is now the only place the version is
set, and main carries the snapshot of the next patch release, starting with
0.9.2-SNAPSHOT. The root build fails for anything but X.Y.Z or
X.Y.Z-SNAPSHOT, and the docs name no version.

./gradlew releaseDist starts the new release workflow on main, which only
ever starts by hand. It refuses a version without -SNAPSHOT or one already
tagged, runs the CI checks, commits and tags X.Y.Z, builds and smoke-tests
the bitmap web image for linux/amd64 and linux/arm64 and the terminal game
zip, pushes ghcr.io/lagergren/rylween:X.Y.Z and :latest, moves main to
X.Y.(Z+1)-SNAPSHOT, and publishes the GitHub release with the zip and a
compose.yaml that pulls the image. A dry run pushes and publishes nothing.
setReleaseVersion and setNextSnapshotVersion make the two version moves.

main takes only pull requests, so the workflow pushes with a deploy key in
the RELEASE_DEPLOY_KEY secret that the main ruleset lets bypass that.

The terminal zip (:runtime:terminalDistZip) ships bin/run.sh as bin/rylween,
which now also runs from an unpacked download. The bitmap image's builder
stage runs on the build platform, so the arm64 image needs no emulation.
The terminal game never shows the bitmap paintings, which made up 147 MB
of :game's 170 MB jar. The installed launcher, and with it bin/run.sh, the
scripted runtime checks, and the release zip, now runs with a copy of that
jar without bitmap/**, so the zip shrinks from 180 MB to 32 MB.
Compared with Gradle 9.8.1 on a forced full run of the CI checks, the
terminal zip, and the bitmap install, it gives the same warnings, no
deprecations, and the same green tests. The only new task is the
kotlin-dsl plugin's own :build-logic:checkKotlinCompilerVersion.
…te plugins

JLine 4.5.0, Playwright 1.64.0, PMD 7.29.0, the versions plugin 0.67.0,
and version-catalog-update 1.1.2. Node.js moves to 26.13.0, the current
LTS line, and TypeScript to 7.0.2.

TypeScript 7 no longer takes "module": "none", so the client compiles
with es2020, which leaves the import-free scripts as they were, and it
needs rootDir spelled out. Its DOM types widen HTMLElement.hidden to
boolean | "until-found", so the three popover toggles read it through
Boolean(). The generated JavaScript is otherwise unchanged.

Kotlin stays on 2.4.21, the latest stable release; the update report's
2.5.0 is a beta. sarif4k and kotlin-logging come with ktlint and move
with it.
Node.js 26's Linux binaries link against libatomic.so.1, which the
eclipse-temurin JDK image leaves out, so npm failed with exit 127 when
the image compiled the TypeScript client. The GitHub runners have it,
so CI passed regardless.
@lagergren
lagergren merged commit a15787c into main Nov 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant