Skip to content

Releases & Versioning

Delivery validates its selected source with reusable CI before any release automation or publication. It maintains reviewed Release Please PRs, publishes edge images for unreleased master commits, and publishes stable images plus installer assets when the reviewed release is created.

Source event Result
Pull request CI validation only; no artifacts or credentials
master push Full CI; Release Please creates/updates the release PR; unreleased commits publish edge images
Merged Release Please PR Full CI; exact vX.Y.Z tag; multi-architecture PHP-FPM and FrankenPHP images in GHCR and Docker Hub; production approval boundary before stable finalization
Manual version: X.Y.Z on master Full CI; request a newer stable version through Release Please; no direct image publication
Manual tag: vX.Y.Z on master Validate the published automation-created release and master ancestry; run CI for the tag commit; recover missing delivery outputs without silently replacing existing immutable images

Production deployments should use the exact stable image reference from release metadata, not a moving alias. Delivery also maintains latest, major, and minor aliases for the newest matching stable release; recovery of an older release does not move those aliases backwards. The separate edge channel follows current master for staging/development and uses mutable edge (PHP-FPM) and edge-frankenphp (FrankenPHP) aliases. An older concurrent build checks current master before moving edge aliases.

Release Please reads Conventional Commit titles from merged work and opens a reviewed PR. Merging that PR updates CHANGELOG.md, .release-please-manifest.json, and the tracked version.json version, creates the exact vX.Y.Z tag, and creates a draft GitHub Release.

After full source validation, the same Delivery run:

  1. Checks out the immutable source commit and determines edge or stable metadata.
  2. Reuses existing SHA-tagged images only after verifying attestations from this repository’s Delivery workflow on master. Invalid provenance blocks publication instead of overwriting the SHA tag.
  3. Builds missing PHP-FPM and FrankenPHP images on native linux/amd64 and linux/arm64 runners, with separate BuildKit caches, SBOMs, and provenance.
  4. Merges immutable sha-<commit> and sha-<commit>-franken manifests in GHCR.
  5. Enters production for stable finalization (container-publishing for edge), replicates matching digests to Docker Hub, restores embedded version metadata, attests new images, and verifies digests/architectures/attestation manifests.
  6. Promotes verified channel/SemVer aliases. Stable delivery checksums and uploads the installer bundle and publishes the GitHub release.

version.json currently records the protected SHA tag, not a digest reference. The image digest is independently verified across both registries before promotion. Do not rewrite an existing SHA or exact SemVer tag to a different image. A registry outage or failed attestation verification is not permission to replace an immutable tag.

The delivery job validates the complete asset contract before uploading: the bootstrap, operator command, Swarm files, Compose fallback, environment example, image metadata, and SHA256SUMS must all be present and match. Before announcing a release, maintainers should download the draft assets on a disposable Linux host, verify the checksum manifest, and exercise the installer against a staging domain.

The exact SemVer image tag and its digest are the deployment contract. Do not deploy a mutable alias.

Standalone modules have a separate release step. A module tag updates the public catalog only after a registry maintainer generates and signs the matching metadata. The KoAkademy application then updates its Composer lockfile and publishes a new image before a deployed container can receive the module code.

Read Module Registry for the contributor workflow, signing boundary, Composer commands, Marketplace enablement, Swarm rollout, legacy source-tree module behavior, and rollback guidance.

Every release contains:

  • version.json with the immutable GHCR SHA-tagged image reference and source commit
  • install.sh and koakademy
  • swarm-stack.yml, swarm-stack-direct.yml, Caddyfile, and koakademy-app-entrypoint.sh
  • compose.production.yaml and default.env.production.example
  • SHA256SUMS

Verify downloaded files before executing them:

Terminal window
sha256sum --check SHA256SUMS
Setting Purpose
RELEASE_PLEASE_TOKEN Fine-grained token with Contents, Pull requests, and Issues read/write for Release Please
release-automation Protected environment for Release Please
DOCKERHUB_IMAGE Actions variable containing namespace/repository; required for both image variants
DOCKERHUB_USERNAME, DOCKERHUB_TOKEN Docker Hub publication credentials; available to both publishing environments
container-publishing Protected environment for immutable container builds and automatic edge finalization
production Stable finalization: require reviewers, prevent self-review where supported, and allow only protected master deployments
CI / required Required master status check; require PR review and review administrator bypass policy separately

The built-in GitHub token publishes GHCR packages, attestations, and release assets. CI receives no deployment secrets. Keep all release/publishing environments limited to the protected master branch. If Docker Hub credentials are environment-scoped, configure them for both container-publishing and production; repository-scoped secrets are available to both.

GitHub setup is required: YAML’s environment: production declaration does not enforce manual approval by itself. Stable delivery checks that this environment already has required reviewers and protected-branch restrictions; missing or unreadable configuration blocks publication. Configure these rules in Settings → Environments before releasing. No workflow in this repository deploys application servers automatically; operators deploy approved release images using the installer/operator commands.

Run Delivery manually from master with exactly one existing stable tag to recover a delivery. Recovery verifies the release author/publication state and that its commit is an ancestor of master; current CI must still pass against that historical source. Missing images can be built, verified existing GHCR images can repair a missing Docker Hub copy, and release assets can be reassembled. Divergent registry digests or missing/invalid provenance on existing images fail closed and require investigation. A partial run that pushed a SHA manifest but never attested it needs operator repair, not an automatic overwrite.

Application rollback uses the prior exact image recorded by koakademy update. It never reverses database migrations automatically. Read release notes and restore the matching database backup when prior code cannot use the migrated schema.