File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Set-PSRepository - Name PSGallery - InstallationPolicy Trusted
2+
3+ $releaseNotes = $env: RELEASE_NOTES
4+ $moduleVersion = $env: Gitversion_SemVerId
5+ Write-Host " ModuleVersion: $moduleVersion "
6+
7+ $manifestPath = Resolve-Path - Path " *\*.psd1"
8+ Write-Host " Manifest Path: $manifestPath "
9+
10+
11+ Update-ModuleManifest - ReleaseNotes $releaseNotes - Path $manifestPath.Path - ModuleVersion $moduleVersion # -Verbose
12+
13+ $moduleFilePath = Resolve-Path - Path " *\*.psm1"
14+ Write-Host " Module File Path: $moduleFilePath "
15+
16+ $modulePath = Split-Path - Parent $moduleFilePath
17+ Write-Host " Module Path: $modulePath "
18+
19+ $module = $modulePath | Split-Path - leaf
20+
21+ $nuGetApiKey = $env: PSGallery_PAT
22+
23+ try {
24+ Publish-Module - Path $modulePath - NuGetApiKey $nuGetApiKey - ErrorAction Stop - Force
25+ Write-Host " Module: $module Version: $moduleVersion has been Published to the PowerShell Gallery!"
26+ } catch {
27+ throw $_
28+ }
You canβt perform that action at this time.
0 commit comments