Skip to content

ci: publish the image before the tag and the release - #277

Merged
blaipr merged 1 commit into
mainfrom
ci/publish-before-release
Oct 30, 2026
Merged

blaipr merged 1 commit into
mainfrom
ci/publish-before-release

Conversation

@blaipr

@blaipr blaipr commented Oct 30, 2026

Copy link
Copy Markdown
Member

Merging the release PR created the tag and the GitHub Release first and built the image after: for the minutes of the build the new version was the latest release with no image to pull, and a failed build would have left a release whose image never existed. (Seen on unified-gitops 0.5.0, which has the same workflow; fixed there in OpusProjects/unified-gitops#45.)

  • release-please-config.json: "draft": true. release-please creates the release as a draft, which has no tag and nobody sees.
  • release.yml: the publish job checks out the release commit, builds and pushes the image, and then publishes the draft (gh release edit --draft=false --latest), which creates the tag. A failed build leaves a hidden draft; re-running the job finishes the release.
  • docs/releasing.md and CLAUDE.md describe the new order and the one approval a release PR needs while github-actions[bot] is still a first-time contributor here (open release PR chore: release v0.37.1 #273 will need it).

Merging the release PR created the tag and the GitHub Release first and
built the image after, so for the minutes of the build the new version
was the latest release with no image to pull, and a failed build would
have left a release whose image never existed.

release-please now creates the release as a draft, which has no tag
and nobody sees; the publish job builds the image from the release
commit, pushes it, and only then publishes the draft, which creates
the tag and makes it the latest release. A failed build leaves a
draft; re-running the job finishes the release.

The release docs say so and explain the one approval a release PR
needs while github-actions[bot] is still a first-time contributor here.
@blaipr
blaipr merged commit 80ed3f7 into main Oct 30, 2026
5 checks passed
@blaipr
blaipr deleted the ci/publish-before-release branch October 30, 2026 18:50
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.

1 participant