Browse Source

parameterized api key for nuget package push

pull/3091/head
Arkat Erol 6 years ago
parent
commit
35742c00ba
  1. 4
      nupkg/push_packages.ps1

4
nupkg/push_packages.ps1

@ -1,5 +1,7 @@
. ".\common.ps1"
$apiKey = $args[0]
# Get the version
[xml]$commonPropsXml = Get-Content (Join-Path $rootFolder "common.props")
$version = $commonPropsXml.Project.PropertyGroup.Version
@ -7,7 +9,7 @@ $version = $commonPropsXml.Project.PropertyGroup.Version
# Publish all packages
foreach($project in $projects) {
$projectName = $project.Substring($project.LastIndexOf("/") + 1)
& dotnet nuget push ($projectName + "." + $version + ".nupkg") -s https://api.nuget.org/v3/index.json --api-key "API_KEY"
& dotnet nuget push ($projectName + "." + $version + ".nupkg") -s https://api.nuget.org/v3/index.json --api-key "$apiKey"
}
# Go back to the pack folder

Loading…
Cancel
Save