Skip to content

fix(ci): prevent release notes override by workflow - #877

Merged
ajianaz merged 2 commits into
developfrom
fix/release-notes-workflow
Aug 5, 2026
Merged

ajianaz merged 2 commits into
developfrom
fix/release-notes-workflow

Conversation

@ajianaz

@ajianaz ajianaz commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

What

Fix release.yml CI workflow that overwrites manually curated release notes.

Changes

  1. Prefer RELEASE_NOTES.md — If committed in repo root, use it as release body instead of auto-generating from CHANGELOG
  2. Fallback to auto-generation — If RELEASE_NOTES.md is absent, auto-generate as before (no breakage)
  3. Fix release title — Changed from "Release vX.Y.Z" to just "vX.Y.Z" (cleaner, title is set via gh CLI or GitHub UI anyway)
  4. Add RELEASE_NOTES.md template — Copywriting-style template for future releases

Why

The softprops/action-gh-release@v2 action with body_path overwrites the release body every time CI runs. This caused the v0.12.0 release notes to be replaced with:

  • Raw CHANGELOG copy-paste (not copywriting style)
  • Empty binary names in download table
  • ANSI escape codes from install.sh test output
  • Duplicate failed download attempts in the body

Manual gh release edit fixes were immediately overwritten by the next CI run.

Testing

  • Workflow YAML syntax valid
  • Template follows copywriting style (FAB structure)
  • Fallback path preserves existing behavior
  • v0.12.0 release notes already fixed manually (verified clean)

- If RELEASE_NOTES.md exists in repo root, use it as release body
- Fall back to CHANGELOG auto-generation if file is absent
- Fix release title: 'Release vX.Y.Z' → 'vX.Y.Z' (title set via gh CLI)
- Add RELEASE_NOTES.md template for future releases

Root cause: softprops/action-gh-release@v2 overwrites manually edited
release notes every time CI runs. This caused the v0.12.0 release notes
to be overwritten with raw CHANGELOG text + broken template (empty
binary names, ANSI escape codes from install.sh test output).
echo "" >> release-notes.md
cat >> release-notes.md << RELEASEEOF
# Prefer committed RELEASE_NOTES.md (copywriting quality, manual curation)
if [ -f RELEASE_NOTES.md ]; then
@github-actions

github-actions Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

⚠️ Review could not complete. Cora was unable to reach the LLM API after retries. Check the workflow logs for errors.


Review powered by cora-code · BYOK · MIT

Cora found that the template file (with vX.Y.Z, #NNN, etc.) would be
used as-is if a maintainer tags without editing it first. Now the
workflow checks for placeholder patterns and fails fast with an
actionable error message.
@ajianaz
ajianaz merged commit 5c9b449 into develop Aug 5, 2026
13 checks passed
@ajianaz
ajianaz deleted the fix/release-notes-workflow branch August 5, 2026 07:45
ajianaz added a commit that referenced this pull request Aug 13, 2026
* fix(ci): prefer RELEASE_NOTES.md over auto-generated release body

- If RELEASE_NOTES.md exists in repo root, use it as release body
- Fall back to CHANGELOG auto-generation if file is absent
- Fix release title: 'Release vX.Y.Z' → 'vX.Y.Z' (title set via gh CLI)
- Add RELEASE_NOTES.md template for future releases

Root cause: softprops/action-gh-release@v2 overwrites manually edited
release notes every time CI runs. This caused the v0.12.0 release notes
to be overwritten with raw CHANGELOG text + broken template (empty
binary names, ANSI escape codes from install.sh test output).

* fix(ci): guard RELEASE_NOTES.md against unresolved placeholders

Cora found that the template file (with vX.Y.Z, #NNN, etc.) would be
used as-is if a maintainer tags without editing it first. Now the
workflow checks for placeholder patterns and fails fast with an
actionable error message.

---------

Co-authored-by: ajianaz <[email protected]>
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