Skip to content

Commit 54b136c

Browse files
🩹 [Patch]: Replace Write-GitHubNotice with Write-Host for improved logging in Publish-PSModule script
1 parent 540c769 commit 54b136c

2 files changed

Lines changed: 3 additions & 18 deletions

File tree

‎action.yml‎

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,7 @@ inputs:
5656
description: If specified, the action will only log the changes it would make, but will not actually create or delete any releases or tags.
5757
required: false
5858
default: 'false'
59-
Debug:
60-
description: Enable debug output.
61-
required: false
62-
default: 'false'
63-
Verbose:
64-
description: Enable verbose output.
65-
required: false
66-
default: 'false'
67-
Version:
68-
description: Specifies the version of the GitHub module to be installed. The value must be an exact version.
69-
required: false
70-
Prerelease:
71-
description: Allow prerelease versions if available.
72-
required: false
73-
default: 'false'
59+
7460
WorkingDirectory:
7561
description: The working directory where the script will run from.
7662
required: false
@@ -99,5 +85,4 @@ runs:
9985
PSMODULE_PUBLISH_PSMODULE_INPUT_PatchLabels: ${{ inputs.PatchLabels }}
10086
PSMODULE_PUBLISH_PSMODULE_INPUT_VersionPrefix: ${{ inputs.VersionPrefix }}
10187
PSMODULE_PUBLISH_PSMODULE_INPUT_WhatIf: ${{ inputs.WhatIf }}
102-
PSMODULE_PUBLISH_PSMODULE_INPUT_WorkingDirectory: ${{ inputs.WorkingDirectory }}
10388
run: ${{ github.action_path }}/scripts/main.ps1

‎scripts/helpers/Publish-PSModule.ps1‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@
343343
" PowerShell Gallery [$publishPSVersion]($psGalleryReleaseLink) has been created.'"
344344
)
345345
} else {
346-
Write-GitHubNotice "Module [$Name - $publishPSVersion] published to the PowerShell Gallery."
346+
Write-Host "::notice::Module [$Name - $publishPSVersion] published to the PowerShell Gallery."
347347
gh pr comment $pull_request.number -b "Module [$Name - $publishPSVersion]($psGalleryReleaseLink) published to the PowerShell Gallery."
348348
if ($LASTEXITCODE -ne 0) {
349349
Write-Error 'Failed to comment on the pull request.'
@@ -384,7 +384,7 @@
384384
exit $LASTEXITCODE
385385
}
386386
}
387-
Write-GitHubNotice "Release created: [$newVersion]"
387+
Write-Host "::notice::Release created: [$newVersion]"
388388
}
389389
}
390390

0 commit comments

Comments
 (0)