Skip to content

Commit 0ae30e6

Browse files
committed
✨ Add Publish to PSGallery script
1 parent 7c85991 commit 0ae30e6

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

PSGitChangeLog/PSGitChangeLog.psd1

2 Bytes
Binary file not shown.

Publish-ToPSGallery.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Param (
2+
$nuGetApiKey = $env:PSGallery_PAT
3+
)
14
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
25

36
$releaseNotes = $env:RELEASE_NOTES
@@ -18,8 +21,6 @@ Write-Host "Module Path: $modulePath"
1821

1922
$module = $modulePath | Split-Path -leaf
2023

21-
$nuGetApiKey = $env:PSGallery_PAT
22-
2324
try {
2425
Publish-Module -Path $modulePath -NuGetApiKey $nuGetApiKey -ErrorAction Stop -Force
2526
Write-Host "Module: $module Version: $moduleVersion has been Published to the PowerShell Gallery!"

0 commit comments

Comments
 (0)