BUILD-11107 Switch release workflow to workflow_dispatch#311
BUILD-11107 Switch release workflow to workflow_dispatch#311julien-carsique-sonarsource wants to merge 1 commit into
Conversation
ca565a0 to
e3e7b1a
Compare
SummaryThis PR switches the release workflow from being triggered by The workflow now:
Also includes minor fixes: regex validation corrected to allow single-digit major versions and literal dots; What reviewers should knowStart here: Review the trigger change (line 3-10) and the new "Create and push release tag" step (lines 52-65) to understand the sequence change. Key decision: The Critical new inputs:
Security: Validation to verify: Regex pattern now correctly validates format Slack notifications updated to use
|
e3e7b1a to
e66fae4
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>
e66fae4 to
d520116
Compare
There was a problem hiding this comment.
LGTM! ✅
All three previously flagged issues have been addressed correctly in this iteration:
- Regex fix (line 37):
[1-9][0-9]*now allows single-digit major versions;.separators properly escaped as\.. - Tag existence check (lines 57–62): The pre-flight guard prevents duplicate tag creation and gives actionable cleanup instructions covering both the git tag and any orphaned draft release.
permissions: contents: write (line 16) is already present in the unchanged part of the file, so both git push origin "$TAG_NAME" and gh release edit --draft=false will have the necessary token scope. No new issues found.
|
| shell: bash | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| ref: ${{ github.event.release.tag_name }} |
There was a problem hiding this comment.
What do you think about adding a section to the DEVELOPER.md on creating a release on a long-lived branch? In this case the release workflow must be run from the branch-* branch and not from master, right?





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 SHARelease flow
References
Test plan