Releases with catladder
A release is what produces a vX.Y.Z git tag (with a changelog), which
in turn triggers the taggedRelease pipeline that deploys to stage
and prod (see the catladder-pipelines skill). Enable it in
catladder.ts:
releases: {
when: "auto", // "manual" (default) | "auto"
method: "semantic-release", // "semantic-release" (default) | "changesets"
}
Change catladder.ts and regenerate (yarn catenv) â the release jobs
are generated, never hand-edited.
when â who triggers the releaseâ
manual(default) â thecreate releasejob on the main branch can be clicked at any time, even while the pipeline is still running: it queues the release, which then runs automatically as soon as every other job of the pipeline succeeded (and is skipped if the pipeline fails). Clicking after a green pipeline releases right away.- On GitLab the button is a quick no-op job; the actual release runs
in the automatic
đ release once pipeline succeedsjob (skipped when the button was never clicked â never run it by hand). - On GitHub, releasing is the
đ catladder create releaseworkflow (Actions sidebar â Run workflow): it releases immediately when the main workflow for HEAD is green, queues the release when it is still running (theđ ī¸ catladder release on greenworkflow then picks it up on completion), and fails when the run concluded red.
- On GitLab the button is a quick no-op job; the actual release runs
in the automatic
autoâ the release job runs automatically on every main-branch pipeline (it still no-ops when there is nothing to release).
There is always also a force release escape hatch that releases
immediately, ignoring the state of the pipeline: on GitLab the
manual â ī¸ force create release job, on GitHub the force checkbox of
the đ catladder create release workflow. With method: "changesets"
forcing has an extra meaning: it releases even when no changesets are
pending (patch bump with a generic changelog entry) â the recovery
path when a change was merged without a changeset and must ship now.
On GitHub, other manual tasks are split into per-kind dispatch
workflows the same way (âļī¸ catladder deploy, âšī¸ catladder stop,
âŠī¸ catladder rollback), each with a dropdown of its tasks.
method â how the version is decidedâ
Whichever method runs, the release ends the same way: a vX.Y.Z tag, a
CHANGELOG.md entry, a chore(release): <version> commit, and an
entry on the releases page of the git host (gitlab /-/releases,
github /releases) carrying the release notes.
semantic-release (default)â
The version is derived automatically from conventional commit
messages since the last release (fix: â patch, feat: â minor,
BREAKING CHANGE â major). Nothing to declare by hand â just write
conventional commits.
changesetsâ
Developers declare changes intentionally as .changeset/*.md files
(the official changesets format: a bump type + a human-written summary).
The release job consumes all pending changesets, takes the highest bump,
computes the next version from the last v* git tag, writes the
changelog, commits chore(release): <version>, pushes the tag and
creates the release entry on the git host (gitlab /-/releases,
github /releases) with the changelog as its description. An empty
.changeset/ folder means there is nothing to release.
Add a changeset by creating .changeset/<name>.md:
---
"my-app": minor
---
Add the new export endpoint.
When you (an agent) make a user-facing change in a changesets
project, add a changeset file in the same MR â bump level major
(breaking) / minor (feature) / patch (fix), and a one-to-two
sentence summary written for the changelog reader. Docs/chore-only
changes need none. The package name in the frontmatter is ignored
(versions come from git tags); only the bump counts.
The changeset check (MR/PR pipelines)â
Changesets projects get a đĻ changeset check job in every
merge-request pipeline. It reports what merging would do â the
changesets this MR adds, everything pending, and the version the next
release would get (with a changelog preview) â and warns without
blocking (allow_failure) when the MR adds no changeset:
- GitLab: report in the job log and as an exposed artifact
(
changeset-report.md) in the MR widget. If the project makesGL_TOKENavailable to MR pipelines it also maintains a sticky MR comment (opt-in â an api-scope token in MR pipelines is a security trade-off). - GitHub: maintains a sticky PR comment via the workflow token; the job stays green and reports a warning annotation (github has no yellow job state, and a red job would read like a real failure).
A yellow changeset-check job on an MR is a prompt to ask: is this change user-facing? If yes, add a changeset; if not, ignore it.
The security-audit gateâ
Both methods gate on a dependency security audit before releasing.
The release entrypoint runs the audit first; only if it passes does it
create the version, changelog and tag. On GitLab, if the audit document
is missing or invalid the job opens a merge request with a security-audit
template and fails â resolve that MR, then re-run the release. See
the security commands in the catladder-cli reference.
Debugging a failed releaseâ
- Fails immediately on the audit â handle the security-audit gate above.
changesetsreleased nothing â no.changeset/*.mdfiles were pending. To ship anyway, force the release (patch bump) â gitlab:â ī¸ force create releasejob, github: force checkbox â or merge an MR adding a changeset describing the accumulated work.- Wrong version bump â check commit types (semantic-release) or the bump levels in the changeset files (changesets).
- Tag pushed but nothing on the releases page â with
changesetsthe entry is created via the host api after the push and never fails the job (the release itself is done); look for thecould not create the release entrywarning at the end of the release job log. On gitlab it needsGL_TOKEN(catladder project renew-token). Releases tagged before catladder created entries have none â that is not fixed retroactively, create them by hand from the tag. - Inspect the job with
yarn catladder project ci job-log(see thecatladder-cliskill).
Related skillsâ
catladder-configâ catladder.ts structure and regenerationcatladder-pipelinesâ thetaggedReleasetrigger and stage/prod deployscatladder-cliâproject ciandsecuritycommandscatladder-migrate-release-methodâ switching an existing project between semantic-release and changesets (incl. backfilling changesets for everything merged since the last release tag)