-
Notifications
You must be signed in to change notification settings - Fork 0
🚀 [Feature]: Add PR Title and Description as Configurable Release Notes #264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…d notes in Publish-Module workflow
There was a problem hiding this 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 adds three new configurable settings for release notes generation based on pull request metadata, aligning with the Auto-Release pattern. The changes enable users to customize whether the PR title is used as the release name, whether the PR body becomes the release notes content, and whether the PR title appears as a heading above the body.
Changes:
- Added three new boolean settings to the
Publish.Moduleconfiguration section - Updated the workflow to pass these settings to the Publish-PSModule action
- Documented the new settings in the README configuration table and defaults example
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| README.md | Adds documentation for three new Publish.Module settings (UsePRTitleAsReleaseName, UsePRBodyAsReleaseNotes, UsePRTitleAsNotesHeading) in both the configuration table and defaults YAML example |
| .github/workflows/Publish-Module.yml | Passes the three new settings from the configuration to the Publish-PSModule action |
There was a problem hiding this 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 3 out of 3 changed files in this pull request and generated 2 comments.
…ion tags for Get-Settings and Publish-Module
There was a problem hiding this 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 3 out of 3 changed files in this pull request and generated 1 comment.
There was a problem hiding this 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 4 out of 4 changed files in this pull request and generated 4 comments.
… and add ReleaseType input
There was a problem hiding this 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 5 out of 5 changed files in this pull request and generated 4 comments.
… updating PSResourceGet in Publish-Module workflow
There was a problem hiding this 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 5 out of 5 changed files in this pull request and generated 3 comments.
There was a problem hiding this 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 5 out of 5 changed files in this pull request and generated 1 comment.
There was a problem hiding this 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 5 out of 5 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
.github/workflows/Publish-Module.yml:38
- The artifact download and PSResourceGet update steps have been removed, but the workflow still references
ModulePath: outputs/moduleon line 38. Without downloading the module artifact first, theoutputs/moduledirectory will not exist, causing the publish step to fail. These removed steps appear necessary for the workflow to function correctly.
- name: Publish module
uses: PSModule/Publish-PSModule@feature/releasetype-input
env:
GH_TOKEN: ${{ github.token }}
with:
Name: ${{ fromJson(inputs.Settings).Name }}
ModulePath: outputs/module
There was a problem hiding this 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 10 out of 10 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
.github/workflows/Publish-Module.yml:38
- The Publish-Module workflow references 'ModulePath: outputs/module' but no longer downloads the module artifact, and there is no direct dependency on Build-Module in the workflow.yml file. While Build-Module is indirectly a dependency through Build-Site -> Build-Docs -> Build-Module, this creates a fragile dependency chain. If Build-Site or Build-Docs are skipped (which is allowed per the Publish-Module conditions), the module artifact may not exist when this action tries to access it. Consider either: (1) adding Build-Module as an explicit dependency in workflow.yml's Publish-Module job, or (2) documenting that the new [email protected] action handles artifact downloading internally and no longer requires the artifact to be pre-downloaded.
- name: Publish module
uses: PSModule/Publish-PSModule@e1b338d1266dee28c6d6218756979597c8a77b7a # v2.2.0
env:
GH_TOKEN: ${{ github.token }}
with:
Name: ${{ fromJson(inputs.Settings).Name }}
ModulePath: outputs/module
Your pull request title and description are now automatically used as release notes when publishing modules. By default, merging a PR creates a GitHub release with your PR title as a heading and your PR description as the release notes content. Additionally, when a PR is closed without merging, the workflow now automatically cleans up any prerelease versions and tags, preventing orphaned prereleases in the PowerShell Gallery.
PR-based release notes are now the default
Release notes are now automatically generated from your pull request content. When you merge a PR, the workflow creates a GitHub release with:
# Add retry logic (#123))No configuration needed—just write meaningful PR descriptions and they become your release notes.
Customizing release notes behavior
Three settings in
PSModule.ymlcontrol this behavior:Publish.Module.UsePRTitleAsReleaseNamefalsePublish.Module.UsePRBodyAsReleaseNotestruePublish.Module.UsePRTitleAsNotesHeadingtrueTo disable PR-based release notes and use GitHub's auto-generated notes instead:
Abandoned PR cleanup
When a PR is closed without merging (abandoned), the workflow now:
This saves CI resources and ensures abandoned work doesn't leave orphaned prereleases. Controlled by
Publish.Module.AutoCleanup(enabled by default).Action version pinning
All GitHub Actions references now use commit SHAs with version comments for improved security and reproducibility:
actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5PSModule/GitHub-Script@2010983167dc7a41bcd84cb88e698ec18eccb7ca # v1.7.8PSModule/Publish-PSModule@e1b338d1266dee28c6d6218756979597c8a77b7a # v2.2.0PSModule/Get-PSModuleSettings@28c1805d689dc5bfcfba7489e76c34a6d33d7da8 # v1.4.0