Public/Utilities/Publish-JyskITAutomation.ps1
function Publish-JyskITAutomation() { try { $PSGalleryKey = Get-PSGalleryKey } catch { Write-Error "Failed to retreive PSGallery key from Azure Key Vault: $_" } Write-Host "Please make sure you have updated the version number in the module manifest. (JyskIT.Automation.psd1)" -ForegroundColor Yellow $Response = Read-Host "Are you sure you want to publish the module to PSGallery? [Y/N]" if ($Response.ToLower() -ne 'y') { return } Publish-Module -Path ".\" -NuGetApiKey $PSGalleryKey } |