Skip to content

Fix release notes losing newlines/content in GitHub Release and PS Gallery#111

Merged
thoemmi merged 3 commits intomasterfrom
fix/release-notes-linefeeds
Feb 22, 2026
Merged

Fix release notes losing newlines/content in GitHub Release and PS Gallery#111
thoemmi merged 3 commits intomasterfrom
fix/release-notes-linefeeds

Conversation

@thoemmi
Copy link
Owner

@thoemmi thoemmi commented Feb 22, 2026

Problem

When using template expressions inline in YAML, GitHub Actions substitutes the multiline string before YAML parsing:

  • body: in with: block: newlines are collapsed - release description appears as a single line (observed in v2.10 release)
  • RELEASE_NOTES: in env: block: multiline value produces invalid YAML - env var is empty - PS Gallery release notes are empty

Fix

Write the generated notes to release-notes.md once, then read from it in both steps:

  • softprops/action-gh-release uses body_path: release-notes.md instead of body:
  • Publish-Module reads Get-Content -Path release-notes.md -Raw instead of the env var

The now-unnecessary GITHUB_OUTPUT heredoc (step output) is also removed.

thoemmi and others added 2 commits February 23, 2026 00:17
Using body: with a template expression inlines the multiline string
directly into YAML, which collapses newlines. Write notes to a file
and use body_path instead, which preserves formatting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Both body: and RELEASE_NOTES: env var used template expressions that
inline multiline strings into YAML, collapsing newlines and producing
invalid YAML respectively.

Fix: write notes to release-notes.md and read from it in both steps:
- softprops/action-gh-release uses body_path: release-notes.md
- Publish-Module reads the file via Get-Content -Raw

Also removes the now-unnecessary step output (GITHUB_OUTPUT heredoc).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 22, 2026 23:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes release notes formatting/emptiness issues in the release pipeline by persisting generated notes to a file and reusing it for both the GitHub Release body and PowerShell Gallery publication.

Changes:

  • Write generated release notes to release-notes.md instead of exporting them via step outputs/env vars.
  • Update softprops/action-gh-release to use body_path to preserve multiline formatting.
  • Update Publish-Module to read release notes from the file via Get-Content -Raw.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@thoemmi thoemmi merged commit 8f7fa2f into master Feb 22, 2026
5 checks passed
@thoemmi thoemmi deleted the fix/release-notes-linefeeds branch February 22, 2026 23:37
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