Skip to content

ci(release): build release notes from CHANGELOG; auto-populate PSData.ReleaseNotes; harden version expansion#19

Merged
tablackburn merged 3 commits into
mainfrom
ci/release-tooling-from-changelog
May 21, 2026
Merged

ci(release): build release notes from CHANGELOG; auto-populate PSData.ReleaseNotes; harden version expansion#19
tablackburn merged 3 commits into
mainfrom
ci/release-tooling-from-changelog

Conversation

@tablackburn
Copy link
Copy Markdown
Owner

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.

  1. GitHub release notes from CHANGELOG.md (replaces --generate-notes): Create GitHub Release extracts 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.
  2. Auto-populate PSData.ReleaseNotes at publish: add ChangelogManagement 3.1.0; new UpdateReleaseNotes task sets the built manifest's PrivateData.PSData.ReleaseNotes from the matching CHANGELOG entry (via $PSBPublishDependency, before publish). Non-fatal at every step.
  3. Harden version expansion: pass ${{ steps.version.outputs.version }} via env: in the three steps that inlined it (template-injection class).

UpdateReleaseNotes is wired via $PSBPublishDependency so it composes with this repo's existing build customizations ($PSBPesterDependency / DownloadTestTools).

Verification

  • ChangelogManagement parses this repo's CHANGELOG (0.2.3 resolvable).
  • Workflow YAML parses; build.psake.ps1 parses; no inline ${{ }} remain in any run: body.

Part of the consumer rollout of the template's release tooling.

🤖 Generated with Claude Code

tablackburn and others added 2 commits May 20, 2026 20:31
…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>
Copilot AI review requested due to automatic review settings May 21, 2026 00:32
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

Warning

Rate limit exceeded

@tablackburn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 59 minutes and 9 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 59638d24-ea3a-46b2-a4a2-4c73449bb174

📥 Commits

Reviewing files that changed from the base of the PR and between a0611f7 and bf06f8e.

📒 Files selected for processing (3)
  • .github/workflows/PublishModuleToPowerShellGallery.yaml
  • build.depend.psd1
  • build.psake.ps1
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/release-tooling-from-changelog

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.

Copy link
Copy Markdown

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 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.md into the built module manifest before publishing.
  • Add ChangelogManagement as a build dependency to parse Keep-a-Changelog formatted entries.
  • Update the publish workflow to generate GitHub release bodies from the matching CHANGELOG.md section (with defensive fallback to --generate-notes) and to avoid inlining ${{ }} in run: 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.

Comment thread build.psake.ps1 Outdated
Comment thread build.depend.psd1
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

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>
@tablackburn tablackburn merged commit 838114d into main May 21, 2026
12 checks passed
@tablackburn tablackburn deleted the ci/release-tooling-from-changelog branch May 21, 2026 03:18
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