Skip to content

Commit a9ca44d

Browse files
committed
use proper module path
1 parent f790b94 commit a9ca44d

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/manual-publish-powershell-gallery.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)