Skip to content

Commit c35cfbe

Browse files
committed
Fixed publishing script
1 parent a6d96ef commit c35cfbe

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

build/Build-Module.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ param(
88

99
[string]$Repository = 'PSGallery',
1010

11-
[string]$ApiKey
11+
[SecureString]$ApiKey
1212
)
1313

1414
# Clean output directory
@@ -95,7 +95,8 @@ function Invoke-Publish {
9595
Write-Host "Publishing EntraExporter module to $Repository..." -ForegroundColor Cyan
9696

9797
try {
98-
Publish-Module -Path $OutputPath -Repository $Repository -NuGetApiKey $ApiKey
98+
$plainKey = ConvertFrom-SecureString $ApiKey -AsPlainText
99+
Publish-Module -Path $OutputPath -Repository $Repository -NuGetApiKey $plainKey
99100
Write-Host "✅ Module published successfully!" -ForegroundColor Green
100101
}
101102
catch {

0 commit comments

Comments
 (0)