ci(release): build release notes from CHANGELOG; auto-populate PSData.ReleaseNotes; harden version expansion#19
Conversation
…pansion
Adopts the release-tooling pattern from PowerShellModuleTemplate.
- Create GitHub Release: extract the published version's CHANGELOG.md section and
pass it via --notes-file (pwsh) instead of --generate-notes. Reads defensively
(Test-Path + try/catch -> falls back to --generate-notes if missing/unreadable)
and excludes the current tag from the compare-link base.
- Pass the version output via env (VERSION) in the release-check, PSGallery-check,
and create-release steps instead of inlining ${{ steps.version.outputs.version }}
(template-injection class).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
So the PowerShell Gallery release-notes panel shows curated, user-facing notes per version (matching the GitHub release) instead of a static link. - build.depend.psd1: add ChangelogManagement 3.1.0. - build.psake.ps1: new UpdateReleaseNotes task (Depends Build) that sets the built manifest's PrivateData.PSData.ReleaseNotes from the matching CHANGELOG entry via Update-ModuleManifest, wired in through $PSBPublishDependency. Non-fatal at every step so a release is never blocked. Verified: ChangelogManagement parses this repo's CHANGELOG. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the release/publish pipeline so GitHub releases and PowerShell Gallery listings use curated release notes sourced from CHANGELOG.md, and hardens GitHub Actions version expansion by passing the version through env: instead of inlining expressions.
Changes:
- Add a psake task to inject release notes from
CHANGELOG.mdinto the built module manifest before publishing. - Add
ChangelogManagementas a build dependency to parse Keep-a-Changelog formatted entries. - Update the publish workflow to generate GitHub release bodies from the matching
CHANGELOG.mdsection (with defensive fallback to--generate-notes) and to avoid inlining${{ }}inrun:blocks.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| build.psake.ps1 | Adds UpdateReleaseNotes task and wires it into publish dependencies. |
| build.depend.psd1 | Adds ChangelogManagement module dependency for changelog parsing. |
| .github/workflows/PublishModuleToPowerShellGallery.yaml | Generates GitHub release notes from CHANGELOG.md and hardens version propagation via environment variables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…warning The catch warning now names the built manifest (like the missing-path warning) so logs identify which file failed to update. No behavior change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Adopts the release-tooling pattern from PowerShellModuleTemplate (merged) and the PlexAutomationToolkit pilot, so releases get curated, user-facing notes on both GitHub and the PowerShell Gallery, sourced from
CHANGELOG.md.CHANGELOG.md(replaces--generate-notes):Create GitHub Releaseextracts the published version's section via--notes-file(pwsh); reads defensively (Test-Path+ try/catch → falls back to--generate-notes), excludes the current tag from the compare-link base.PSData.ReleaseNotesat publish: addChangelogManagement3.1.0; newUpdateReleaseNotestask sets the built manifest'sPrivateData.PSData.ReleaseNotesfrom the matching CHANGELOG entry (via$PSBPublishDependency, before publish). Non-fatal at every step.${{ steps.version.outputs.version }}viaenv:in the three steps that inlined it (template-injection class).UpdateReleaseNotesis wired via$PSBPublishDependencyso it composes with this repo's existing build customizations ($PSBPesterDependency/DownloadTestTools).Verification
ChangelogManagementparses this repo's CHANGELOG (0.2.3resolvable).build.psake.ps1parses; no inline${{ }}remain in anyrun:body.Part of the consumer rollout of the template's release tooling.
🤖 Generated with Claude Code