1
Release process
Matthijs Iriks edited this page 2026-12-04 03:23:25 +01:00

Release process

develop ── feature/*, fix/* ──► release/vX.Y.Z ──► production ──► tag vX.Y.Z ──► Packagist
   ▲        (pull request,        (collects the      (pull request,                  │
   │         merges by itself)     features)          merged by hand)                │
   └──────────────────────── sync: production into develop ◄─────────────────────────┘
  1. Start a release: Actions → Start release → version (0.2.0). That makes release/v0.2.0 from develop.
  2. Features: branch feature/… or fix/… from develop, open a pull request to the release branch. It merges by itself when PR CI is green. Every pull request adds its row to TOKENS.md.
  3. Ready: add a section ## v0.2.0 - date to CHANGELOG.md and open a pull request from the release branch to production. A person merges it.
  4. Release (automatic, on the merge): tests and audit once more, the tag v0.2.0 and a Gitea release with the changelog text, Packagist is told, and production is merged into develop.

Nobody opens a pull request to develop, and production and the release branches take no direct pushes.

When What runs
Pull request to a release branch or to production flow (right branches, version above the latest tag, changelog section, tests of these scripts), ledger (TOKENS.md), test (Pint, Pest with the newest and the oldest dependencies, composer validate), security (composer audit, Trivy on the dependencies, secrets and settings). The check PR CI / pr-ci is green when all are.
Push to production verify (Pest, audit), tag and release, Packagist, sync develop
Every Monday composer audit and Trivy on production
Every Monday Dependency updates: a direct dependency with a release outside its constraint (a new major) gets its constraint widened in a pull request renovate/deps-DATE to the open release branch; PR CI tests it and it merges when green. Nothing happens while no release is open. The central Trivy (every night 03:00 UTC) and Renovate (04:00 UTC) of the homelab also pass over this repo, but read a composer.lock and a package has none, so they find little here.
Every night Prune branches: removes feature/* and fix/* branches whose last commit is over 30 days old and that have no open pull request (a branch of a pull request can be restored from it in Gitea)

Secrets of the repository for this: DEPLOY_TOKEN (the organisation has it), and PACKAGIST_USERNAME and PACKAGIST_TOKEN (until they are set that step only says so). When Packagist does not know the package yet, that step submits it through the create-package API; after that it only tells Packagist about each new tag.

What Composer installs

.gitattributes leaves what only belongs to the repository out of the package (export-ignore): .gitea/, dev/, scripts/, tests/, TOKENS.md, AGENTS.md, phpunit.xml and the dotfiles. They stay in the repository. Packagist builds the archive from git archive, so what a site installs is src/, config/, routes/, resources/, composer.json, README.md and CHANGELOG.md. Check it with git archive HEAD | tar -t.