Table of Contents
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 ◄─────────────────────────┘
- Start a release: Actions → Start release → version (
0.2.0). That makesrelease/v0.2.0fromdevelop. - Features: branch
feature/…orfix/…fromdevelop, open a pull request to the release branch. It merges by itself when PR CI is green. Every pull request adds its row toTOKENS.md. - Ready: add a section
## v0.2.0 - datetoCHANGELOG.mdand open a pull request from the release branch toproduction. A person merges it. - Release (automatic, on the merge): tests and audit once more, the tag
v0.2.0and a Gitea release with the changelog text, Packagist is told, andproductionis merged intodevelop.
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.