refactor: consolidate release pipeline with draft-first pattern#124
Merged
Conversation
zkoppert
reviewed
Apr 6, 2026
70267ba to
2b06e1a
Compare
|
This PR is stale because it has been open 20 days with no activity. Replace the |
zkoppert
previously approved these changes
May 7, 2026
## What Collapse the three separate release workflows (release.yaml, release-image.yaml, release-discussion.yaml) into a single release.yaml reusable workflow using a draft-first pattern: create draft, push tags, build artifacts (optional GoReleaser, optional Docker image), create discussion, then publish. Preserve the legacy release-image.yaml and release-discussion.yaml as stubs that fail with migration instructions. ## Why The three workflows were always chained and shared data flow, so callers had to wire up three workflow calls and reason about ordering themselves. The draft-first sequence supports repositories with immutable releases enabled by ensuring every artifact and attestation lands before the release becomes visible. ## Notes - Breaking: callers of release-image.yaml / release-discussion.yaml hit a deprecation error with migration instructions. - Breaking: update-major-tag input removed; the major tag is always pushed in create_release. - publish defaults to true and is backwards compatible, but release-drafter always creates a draft first and publish_release handles the final flip. - publish_release uses always() with per-job result checks so it runs when optional jobs are skipped but blocks on any failure. - GoReleaser config is validated via yq to require release.disable: true, avoiding conflict with the draft. - Attestation steps probe repo visibility via the GitHub API and warn on private repos instead of failing cryptically. - release_discussion always spins up a runner when a tag is created and skips at the step level if secrets are missing (job-level if: cannot read secrets). - publish_release uses -F draft=false (capital F) to send a boolean rather than a string. Signed-off-by: jmeridth <jmeridth@gmail.com>
zkoppert
previously approved these changes
May 7, 2026
@ Conflicts: @ .github/workflows/release.yaml
zkoppert
approved these changes
May 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Proposed Changes
What
Consolidated the three separate release workflows (
release.yaml,release-image.yaml,release-discussion.yaml) into a singlerelease.yamlreusable workflow with a draft-first release pattern. Added optional GoReleaser support for building and uploading Go binaries. Added apublish_releasejob that publishes the draft only after all artifact, attestation, and discussion jobs succeed.The deprecated
release-image.yamlandrelease-discussion.yamlworkflows are preserved as stubs that fail with clear migration instructions.Why
The three release workflows were always chained together and shared data flow. Consolidating reduces caller complexity from three workflow calls to one. The draft-first pattern (draft → tags → artifacts → attestation → publish) supports repositories with immutable releases enabled, ensuring all artifacts and attestations are in place before the release becomes visible.
Notes
release-image.yamlorrelease-discussion.yamlwill get a deprecation error with migration instructionsupdate-major-taginput removed — major tag is now always pushed increate_releasepublishinput defaults totrue(backwards compatible) but release-drafter always creates a draft first;publish_releasejob handles the final publishpublish_releaseusesalways()with per-job result checks so it runs even when optional jobs are skipped, but blocks on any failureyqto ensurerelease.disable: trueis set, preventing conflicts with the release-drafter draftrelease_discussionjob always spins up a runner when a tag is created, then skips at step level if secrets aren't set (can't use secrets in job-levelif:conditions)-F draft=false(capital F) is used inpublish_releaseto send a boolean, not a stringTesting
actionlintpasses on all modified workflow filesReadiness Checklist
Author/Contributor