You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
This pull request includes several changes to the `Publish-PSModule`
script and the `action.yml` configuration file to improve logging.
### Improvements to the `Publish-PSModule` script:
* Added new module dependencies (`Retry`, `GitHub`) to the `#Requires`
statement in `scripts/helpers/Publish-PSModule.ps1`.
* Added `[OutputType([void])]` attribute to the `Publish-PSModule`
function to specify the output type.
* Replaced `Write-Verbose` with `Write-Output` for better visibility of
key process steps and outputs.
[[1]](diffhunk://#diff-780715ac24c6bbe21b54f3d268778136b79f21a62275bbd494dfa857b4ba40d9L162-R192)
[[2]](diffhunk://#diff-780715ac24c6bbe21b54f3d268778136b79f21a62275bbd494dfa857b4ba40d9L199-R221)
[[3]](diffhunk://#diff-780715ac24c6bbe21b54f3d268778136b79f21a62275bbd494dfa857b4ba40d9L240-R246)
[[4]](diffhunk://#diff-780715ac24c6bbe21b54f3d268778136b79f21a62275bbd494dfa857b4ba40d9L282-R301)
[[5]](diffhunk://#diff-780715ac24c6bbe21b54f3d268778136b79f21a62275bbd494dfa857b4ba40d9L308-R323)
[[6]](diffhunk://#diff-780715ac24c6bbe21b54f3d268778136b79f21a62275bbd494dfa857b4ba40d9L332-R345)
[[7]](diffhunk://#diff-780715ac24c6bbe21b54f3d268778136b79f21a62275bbd494dfa857b4ba40d9L363-R376)
* Introduced retry logic using the `Retry` module when fetching the
latest version from PSGallery to handle transient errors.
### Changes to the `action.yml` configuration file:
* Updated the step name from `Run Build-PSModule` to `Run
Publish-PSModule`.
* Simplified the script path reference by removing unnecessary dot
notation.
## Type of change
<!-- Use the check-boxes [x] on the options that are relevant. -->
- [ ] 📖 [Docs]
- [ ] 🪲 [Fix]
- [x] 🩹 [Patch]
- [ ] ⚠️ [Security fix]
- [ ] 🚀 [Feature]
- [ ] 🌟 [Breaking change]
## Checklist
<!-- Use the check-boxes [x] on the options that are relevant. -->
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
Write-Output"gh pr comment $($pull_request.number) -b 'Published to the PowerShell Gallery [$newVersion]($releaseURL) has been created.'"
333
+
Write-Output"gh pr comment $($pull_request.number) -b 'Published to the PowerShell Gallery [$publishPSVersion]($psGalleryReleaseLink) has been created.'"
321
334
} else {
322
-
Write-Output"::notice::Module [$Name - $newVersion] published to the PowerShell Gallery."
323
-
gh pr comment $pull_request.number-b "Module [$Name - $newVersion] published to the PowerShell Gallery."
335
+
Write-GithubNotice"Module [$Name - $publishPSVersion] published to the PowerShell Gallery."
336
+
gh pr comment $pull_request.number-b "Module [$Name - $publishPSVersion]($psGalleryReleaseLink) published to the PowerShell Gallery."
324
337
if ($LASTEXITCODE-ne0) {
325
338
Write-Error'Failed to comment on the pull request.'
0 commit comments