-
Notifications
You must be signed in to change notification settings - Fork 0
🩹[Patch]: Workflow improvements #60
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
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 removes the deprecated .github/release.yml configuration file as the release configuration has been migrated to the action's input parameters.
Changes:
- Removed
.github/release.ymlfile containing changelog configuration for automatically generated release notes
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Remove old publish script and replace it with a new structured approach using init.ps1, publish.ps1, and cleanup.ps1. - Add GitHub Actions workflow for automated releases triggered by pull request events. - Introduce new parameters for managing versioning and release types, including support for prereleases and cleanup of old prereleases. - Enhance logging and error handling throughout the scripts for better traceability.
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 6 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
.github/workflows/Release.yml:18
- The scope of this PR is described as removing the deprecated
.github/release.ymlconfiguration, but the changes also introduce new PowerShell scripts undersrc/, switch the composite action to use those scripts, and adjust theReleaseworkflow’s name, job ID, and path filters. It would be helpful for future maintainers if the PR description (and/or commit message) were updated to reflect these broader behavior and structure changes, not just the removal of the release configuration file.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 8 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.
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 6 out of 8 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/publish.ps1:192
- This
Write-Hostnotice now includes$releaseURL, but$releaseURLis only assigned in the non-WhatIfbranch above. WhenWhatIfistrue, this line will still log a "New release" notice with an empty URL even though no release was created, which is misleading for consumers of this action. Consider either skipping this notice whenWhatIfis enabled or emitting a distinct "WhatIf"-specific message that does not reference$releaseURL.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 6 out of 8 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.
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 9 out of 9 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (4)
src/publish.ps1:123
- In the WhatIf branch, the
gh pr commentcommand string is built using a single-quoted literal on the second part, so$releaseType,$name,$publishPSVersion, and$psGalleryReleaseLinkwill not be interpolated and the logged command will show the variable names instead of their values. To make the WhatIf output accurately reflect the command that would be run, consider switching this inner string to an interpolated form (e.g., double-quoted or-fformatting) so the variables are expanded.
src/publish.ps1:201 - Similarly to the PSGallery WhatIf output, this
gh pr commentcommand string in the WhatIf branch uses a single-quoted literal, so$releaseType,$name, and$newVersionwill not be interpolated and the logged command will show literal variable names. For more useful diagnostics in WhatIf mode, it would be better to build this string in a way that expands those variables (for example by using a double-quoted string or-fformatting).
src/publish.ps1:127 - In these success messages, there is an unmatched backtick immediately after
$releaseType(e.g.,✅ New release:PowerShell Gallery - ...), which will show up literally in the rendered notice/comment and likely isn’t intended. Consider either removing the backtick or wrapping the release type in matching backticks if you want inline-code formatting.
src/publish.ps1:210 - These GitHub release notifications also include an unmatched backtick immediately after
$releaseTypein both the PR comment body and the::noticetitle, so the rendered text will appear with a stray`character (e.g.,✅ New prerelease:GitHub - ...). If that isn’t intentional, consider removing the backtick or adding a matching one to get proper inline-code formatting around the release type.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 9 out of 9 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/publish.ps1:209
- In the
New-GitHubReleaselog group, the final notice message is always emitted, but$releaseURLis only assigned inside theelsebranch when$whatIfis$false. In WhatIf mode this results in a::noticethat claims a release was created and includes an empty$releaseURL, which is both misleading and relies on an uninitialized variable. Please gate the final notice so it only runs when a release has actually been created (e.g., in the non-WhatIf path where$releaseURLis set) and avoid referencing$releaseURLwhen it may be null.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 9 out of 9 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.
This release makes several improvements to the release workflow and supporting scripts, focusing on standardization, clarity, and modernization. The most significant changes include renaming and updating the release workflow, consolidating and improving PowerShell scripts, and cleaning up configuration files related to linters and release notes. Additionally, the scripts now use
Write-Hostfor output and include more structured and readable logging.Release Workflow Improvements
.github/workflows/Auto-Release.ymlto.github/workflows/Release.yml, updated the workflow name and job names, and switched from theAuto-Releaseaction to the newerRelease-GHRepositoryaction for publishing releases. Also, restricted the workflow to trigger only on changes toaction.ymlandsrc/**.PowerShell Script Modernization and Consolidation
scripts/directory tosrc/, updated references inaction.yml, and improved script output by replacingWrite-OutputwithWrite-Hostfor better compatibility with GitHub Actions. Added more structured and visually separated log output usingWrite-Host '-------------------------------------------------'.Configuration and Linting Cleanup
.github/linters/.jscpd.jsonconfiguration file and disabled JSCPD validation in the linter workflow.PSAvoidUsingWriteHostrule in.github/linters/.powershell-psscriptanalyzer.psd1to allow usingWrite-Hostin scripts running on GitHub Actions.Release Notes and Input Documentation
.github/release.ymlto rely on default GitHub release note generation.IncrementalPrereleaseinput description inaction.yml.