From bfd29c45f2a4b45420355b0088a6eb53e20e9e1c Mon Sep 17 00:00:00 2001 From: lsq Date: Thu, 29 Jan 2026 22:24:31 +0800 Subject: [PATCH] fix: publish workflow module path structure --- .github/workflows/publish.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 769e7dc..726263d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -87,10 +87,16 @@ jobs: exit 1 } - $modulePath = './src' + # Create publish directory structure + $publishDir = './publish/ScriptWhitelistGuard' + New-Item -Path $publishDir -ItemType Directory -Force | Out-Null + + # Copy module files + Copy-Item './src/ScriptWhitelistGuard.psd1' -Destination $publishDir + Copy-Item './src/ScriptWhitelistGuard.psm1' -Destination $publishDir try { - Publish-Module -Path $modulePath -NuGetApiKey $env:PSGALLERY_API_KEY -Verbose -ErrorAction Stop + Publish-Module -Path $publishDir -NuGetApiKey $env:PSGALLERY_API_KEY -Verbose -ErrorAction Stop Write-Host "✓ Successfully published to PowerShell Gallery" -ForegroundColor Green } catch {