File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,11 +141,19 @@ jobs:
141141
142142 # Publish the module
143143 try {
144+ # Create a proper module structure for publishing
145+ $tempModuleDir = Join-Path $env:TEMP "PSBlogger"
146+ if (Test-Path $tempModuleDir) {
147+ Remove-Item $tempModuleDir -Recurse -Force
148+ }
149+ New-Item -ItemType Directory -Path $tempModuleDir -Force | Out-Null
150+ Copy-Item "./src/*" $tempModuleDir -Recurse -Force
151+
144152 if ($isDryRun) {
145- Publish-Module -Path "./src" -NuGetApiKey $env:NUGET_API_KEY -WhatIf -Verbose
153+ Publish-Module -Path $tempModuleDir -WhatIf -Verbose
146154 Write-Host "🧪 DRY RUN: Would publish to PowerShell Gallery (no actual publishing)"
147155 } else {
148- Publish-Module -Path "./src" -NuGetApiKey $env:NUGET_API_KEY -Verbose -Force
156+ Publish-Module -Path $tempModuleDir -NuGetApiKey $env:NUGET_API_KEY -Verbose -Force
149157 Write-Host "✅ Successfully published to PowerShell Gallery"
150158 }
151159 } catch {
You can’t perform that action at this time.
0 commit comments