Skip to content

fix: use GITHUB_OUTPUT for release changelog#25

Merged
rohitg00 merged 1 commit intorohitg00:mainfrom
neilkuan:fix/release-changelog-output
Mar 28, 2026
Merged

fix: use GITHUB_OUTPUT for release changelog#25
rohitg00 merged 1 commit intorohitg00:mainfrom
neilkuan:fix/release-changelog-output

Conversation

@neilkuan
Copy link
Copy Markdown
Contributor

@neilkuan neilkuan commented Mar 8, 2026

Summary

  • The release workflow body field used $(cat /tmp/changelog.txt) which is shell command substitution — but inside YAML it's treated as literal text, so the release page shows $(cat /tmp/changelog.txt) instead of the actual changelog.
  • Switch to multiline GITHUB_OUTPUT heredoc syntax and reference the output via ${{ steps.changelog.outputs.CHANGES }} so the changelog is correctly interpolated.

Test plan

  • Create a test tag (e.g. v2.0.0) and verify the generated GitHub Release body contains actual commit messages instead of $(cat /tmp/changelog.txt)
image

Fix

image

Summary by CodeRabbit

  • Chores
    • Improved internal release workflow automation.
    • Release notes generation now embeds the changelog directly into the release body for more reliable, single-step publication.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9371fd12-c164-4cee-b709-152da31efba4

📥 Commits

Reviewing files that changed from the base of the PR and between c4a3cf4 and 7ac8310.

📒 Files selected for processing (1)
  • .github/workflows/release.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/release.yml

📝 Walkthrough

Walkthrough

The release workflow now emits the multiline changelog to GITHUB_OUTPUT (using a CHANGES<<EOF ... EOF block) and the Release step reads that output instead of reading a temporary /tmp/changelog.txt file.

Changes

Cohort / File(s) Summary
Workflow Output Management
.github/workflows/release.yml
Replaced writing changelog to /tmp/changelog.txt with emitting a multiline CHANGES output via GITHUB_OUTPUT (here: CHANGES<<EOF ... EOF), and updated the release step to reference the step output ${{ steps.changelog.outputs.CHANGES }}.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

I’m a rabbit, I hopped through CI tonight,
I swapped a temp file for output neat and bright,
CHANGES flowed like carrots in a row,
No /tmp crumbs — just a tidy show! 🐇✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: switching from shell command substitution to GITHUB_OUTPUT for the release changelog in the workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…ution

The `$(cat /tmp/changelog.txt)` in the `body` field of
softprops/action-gh-release is YAML, not shell — so it was rendered
as literal text instead of the actual changelog content.

Switch to the multiline GITHUB_OUTPUT heredoc syntax and reference it
via `${{ steps.changelog.outputs.CHANGES }}`.
@neilkuan neilkuan force-pushed the fix/release-changelog-output branch from c4a3cf4 to 7ac8310 Compare March 8, 2026 12:15
@neilkuan
Copy link
Copy Markdown
Contributor Author

neilkuan commented Mar 8, 2026

Please take a look @rohitg00 :).

@rohitg00 rohitg00 merged commit ed2b308 into rohitg00:main Mar 28, 2026
1 check passed
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