File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2323 *.psm1
2424 - name : Validate and publish module
2525 shell : pwsh
26+ env :
27+ nugetkey : ${{secrets.NUGETKEY}}
2628 run : |
2729 # Module path and name
2830 $ModulePath = ".\code365scripts.openai"
@@ -112,15 +114,15 @@ jobs:
112114 # 6. Publish module
113115 Write-Host "🚀 Publishing module to PowerShell Gallery..." -ForegroundColor Yellow
114116 try {
115- Publish-Module -Path $ModulePath -NuGetApiKey "${{ secrets.NUGETKEY }}" -Verbose -Force
117+ Publish-Module -Path $ModulePath -NuGetApiKey $nugetkey -Verbose -Force
116118 Write-Host "🎉 Module published successfully!" -ForegroundColor Green
117119 Write-Host "📦 Module link: https://www.powershellgallery.com/packages/$ModuleName" -ForegroundColor Cyan
118120 }
119121 catch {
120122 Write-Error "❌ Module publishing failed: $_"
121123 Write-Host "📋 Attempting to publish with SkipAutomaticTags..." -ForegroundColor Yellow
122124 try {
123- Publish-Module -Path $ModulePath -NuGetApiKey "${{ secrets.NUGETKEY }}" -Verbose -Force -SkipAutomaticTags
125+ Publish-Module -Path $ModulePath -NuGetApiKey $nugetkey -Verbose -Force -SkipAutomaticTags
124126 Write-Host "🎉 Module published successfully (with SkipAutomaticTags)!" -ForegroundColor Green
125127 Write-Host "📦 Module link: https://www.powershellgallery.com/packages/$ModuleName" -ForegroundColor Cyan
126128 }
You can’t perform that action at this time.
0 commit comments