Skip to content

build: make-owned release lifecycle (tag, publish, unpublish, untag)#5684

Merged
norman-abramovitz merged 4 commits into
cloudfoundry:developfrom
nabramovitz:feat/make-release-lifecycle
Jul 23, 2026
Merged

build: make-owned release lifecycle (tag, publish, unpublish, untag)#5684
norman-abramovitz merged 4 commits into
cloudfoundry:developfrom
nabramovitz:feat/make-release-lifecycle

Conversation

@nabramovitz

@nabramovitz nabramovitz commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Makes `make` own the full release lifecycle so every runner — a human at a terminal, GitHub Actions, or a future Concourse pipeline — is a thin caller of identical targets. Nothing release-specific remains encoded in workflow YAML that another runner can't reuse.

New surface

Verb Does
`make release cf github` artifacts as before, plus `SHA256SUMS` baked in as the final step (stages the cf/korifi zip into `dist/release` first — glue that previously lived in release.yml)
`make stamp tag [VERSION=vX]` create + push the annotated release tag (`TAG_REMOTE` default `origin`)
`make publish [DRAFT=yes] [TAG=vX]` `gh release create --verify-tag` + upload `dist/release/*`; notes from `NOTES=`, else the version's CHANGELOG.md section, else a pointer line; `--prerelease` derived from an alpha/beta/rc part in the tag (dev.N tags can be full releases)
`make unpublish TAG=vX` delete the GitHub release + assets (echoes what it will delete first; the tag survives)
`make stamp untag TAG=vX` delete the tag, local + remote (echoes first)

Forward path: `build` → `release cf github` → `stamp tag` → `publish`. Rollback runs in reverse — release first, so a half-done rollback never orphans the tag. All four lifecycle targets honor `DRYRUN=yes`. `gh` authenticates from the environment (`GH_TOKEN`/`GITHUB_TOKEN` or `gh auth login`) — credentials never appear on a command line. `TAG` defaults to the version with build metadata stripped (`v5.0.0-dev.142+build...` → `v5.0.0-dev.142`).

release.yml becomes a thin caller

  • The `cp` zip-staging line and the separate checksums step collapse into `make release` itself.
  • The changelog-extraction + `gh release create` steps become `make publish TAG=$VERSION`.
  • Prerelease derivation is unchanged (alpha/beta/rc — dev.N tags can be full releases); it now lives in `make publish`, with the workflow's `validate-version` check kept in sync for the docker-build gating.

Latent bug fixed on the way

The inline changelog extraction never worked. Its awk range `/^## ver/,/^## [0-9]/` started and ended on the same header line, so after `sed '1d;$d'` the notes were always empty and every release shipped the fallback pointer line. The extraction in `make publish` prints the section body correctly, and anchors the version so `5.0.0` doesn't match the `5.0.0-rc.1` header.

Verification

  • Every path exercised with `make -n` plus live `DRYRUN=yes` runs (tag/untag/publish/unpublish, checksum ordering, `release cf`-only and `release aio`-only gating, bare-`stamp` frontend default preserved).
  • CHANGELOG extraction tested against the real file: existing section extracts, missing section falls back, `5.0.0` does not match the `5.0.0-rc.1` header.
  • zizmor clean on the workflows; full `make check gate` green.

Version bumped to v5.0.0-dev.143.

make now owns the full release lifecycle so any runner (human, GitHub
Actions, Concourse) is a thin caller of identical targets:

- make release bakes SHA256SUMS in as the final step of artifact
  creation, staging the cf/korifi zip into dist/release first (glue
  that previously lived in release.yml). Exact-version filenames so
  stale zips from earlier builds are never checksummed.
- make stamp tag / stamp untag — create+push / delete the annotated
  release tag (TAG defaults to the version with build metadata
  stripped; TAG_REMOTE defaults to origin).
- make publish — gh release create --verify-tag with assets; notes
  from NOTES=<file>, else the version's CHANGELOG.md section, else a
  pointer line; --prerelease derived from any prerelease part in the
  tag (dev included, unlike the old alpha|beta|rc regex — a dev tag
  is not a production release). DRAFT=yes for a draft.
- make unpublish — delete the GitHub release + assets, echoing what
  will be deleted first; the tag survives for stamp untag, so a
  half-done rollback never orphans it.
- All four honor DRYRUN=yes. gh auth comes from the environment
  (GH_TOKEN/GITHUB_TOKEN or gh auth login), never argv.
Consume the new make-owned release lifecycle: the cp-zip glue and the
checksum step collapse into 'make release' itself, and the changelog
extraction + gh release create steps become 'make publish TAG=...'.
Nothing release-specific remains encoded in workflow YAML that another
runner can't reuse.

Also aligns validate-version's prerelease check with make publish's
derivation (any '-' in the tag): previously a dev.N tag counted as a
production release, which would have tagged the docker image 'latest'
and triggered the production docker build.

The old inline awk changelog extraction never actually worked: its
range pattern (/^## ver/,/^## [0-9]/) started and ended on the same
header line, so after 'sed 1d;$d' the notes were always empty and
every release got the fallback line. make publish's extraction prints
the section body correctly (and anchors the version so 5.0.0 does not
match the 5.0.0-rc.1 header).
Reverts the any-dash prerelease derivation introduced on this branch:
dev.N tags can be published as full releases (the alpha|beta|rc match
in validate-version was deliberate, and plan'd behavior). make publish
and release.yml now derive --prerelease the same way: an alpha/beta/rc
part in the tag.

@norman-abramovitz norman-abramovitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Needs more testing

@norman-abramovitz
norman-abramovitz merged commit dcd79f2 into cloudfoundry:develop Jul 23, 2026
22 checks passed
@nabramovitz
nabramovitz deleted the feat/make-release-lifecycle branch July 23, 2026 03:48
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.

2 participants