Skip to content

Commit fd3a7f5

Browse files
committed
Updating nuget publish script to take an apikey
1 parent 7c3aea9 commit fd3a7f5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Build/Publish-Release.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
[string]
55
$ReleaseVersionNumber,
66

7-
[switch]$Push
7+
[switch]$Push,
8+
9+
[string]$ApiKey
810
)
911

1012
$PSScriptFilePath = (Get-Item $MyInvocation.MyCommand.Path).FullName
@@ -24,6 +26,11 @@ if (-not $?)
2426
# Upload the NuGet package
2527
if ($Push)
2628
{
29+
if($ApiKey)
30+
{
31+
& $NuGetExe setApiKey $ApiKey
32+
}
33+
2734
$NuPkgPath = Join-Path -Path $BuildRoot -ChildPath "PactNet.$ReleaseVersionNumber.nupkg"
2835
& $NuGetExe push $NuPkgPath
2936
if (-not $?)

0 commit comments

Comments
 (0)