BUILD-11107 Switch release workflow to workflow_dispatch#311
Conversation
ca565a0 to
e3e7b1a
Compare
SummaryWhat changed: The release workflow now triggers on manual dispatch ( Why: Previous flow (tag → push → publish release) created published releases that cannot be modified. New flow creates draft releases first (allowing asset attachment), then publishes only after everything is attached. What reviewers should knowCritical flow: The release is now a three-stage process: (1) validate tag format and create git tag, (2) generate SBOM and promote Docker image in draft release, (3) publish via Key implementation details:
Testing gaps to watch for: The recovery procedure (delete tag + delete draft release) is now essential if workflow fails mid-run. Verify the pre-flight check message is clear enough for operators, and that workflow logs explain what happened if tag creation fails. Documentation: Added DEVELOPER.md section explaining the release process, branch selection (critical for maintenance releases on branch-* branches), and explicit recovery steps. Make sure this matches your internal release runbooks.
|
e3e7b1a to
e66fae4
Compare
e66fae4 to
d520116
Compare
Replace the release:published event trigger with workflow_dispatch so the SBOM can be attached before the release is published, avoiding GitHub Release Immutability restrictions (HTTP 422 on asset upload to published releases). The workflow now creates the git tag at HEAD, delegates SBOM generation to SonarSource/gh-action_sbom (which auto-creates a draft release), then publishes the release once all assets are attached. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
d520116 to
c897df5
Compare
|





Summary
release:publishedevent trigger withworkflow_dispatchso the SBOM is generated and attached before the release is published, avoiding GitHub Release Immutability restrictionstag_nameinputrelease-tagtoSonarSource/gh-action_sbomso it can attach assets to a draft release even whenGITHUB_REFis a branch refgh release edit --draft=falseactions/checkoutreferences by commit SHADEVELOPER.md, including the long-lived branch caveatRelease flow
Branch to dispatch from
The git tag is now created at HEAD of the branch the workflow is dispatched from (previously, the tag was created externally and the workflow checked it out by ref). Choose the branch accordingly:
master.branch-4.8): dispatch from thatbranch-*branch, not frommaster. Dispatching frommasterwould tag a commit that does not belong to the maintenance line.Cherry-pick required to maintenance branches
Because the workflow file is checked out from the dispatched ref, this change must be cherry-picked to every active maintenance branch before a release can be cut from it. Currently active:
branch-4.8. Without the cherry-pick, dispatching the release workflow from a maintenance branch will run the oldrelease:published-triggered version, which fails on SBOM attachment due to GitHub Release Immutability.Recovery from a failed release
The "Create and push release tag" step performs a pre-flight
git ls-remotecheck and prints actionable cleanup instructions if the tag already exists (delete the remote tag, and delete any orphaned draft GitHub release before re-dispatching). SeeDEVELOPER.mdfor details.References
Test plan
branch-4.8(and any other active maintenance branch) so maintenance releases can use the new flow