Modules/businessdev.ALbuild.RuntimePackages/Public/Publish-BcRuntimePackage.ps1
|
function Publish-BcRuntimePackage { <# .SYNOPSIS Publishes a runtime NuGet package to a feed (licensed). .DESCRIPTION Pushes a runtime (or indirect) NuGet package to a NuGet v3 feed. A valid ALbuild license is required. .PARAMETER PackagePath Path to the .nupkg. .PARAMETER Url The feed's NuGet v3 service index URL. .PARAMETER ApiKey API key / PAT for publishing. .PARAMETER FailOnConflict Throw if the version already exists. .EXAMPLE Publish-BcRuntimePackage -PackagePath .\pkg.nupkg -Url $feed -ApiKey $key #> [CmdletBinding(SupportsShouldProcess)] param( [Parameter(Mandatory)] [string] $PackagePath, [Parameter(Mandatory)] [string] $Url, [Parameter(Mandatory)] [string] $ApiKey, [switch] $FailOnConflict ) Assert-ALbuildLicensed -Feature 'RuntimePackages' if (-not $PSCmdlet.ShouldProcess($PackagePath, "Publish to $Url")) { return } Publish-BcPackage -PackagePath $PackagePath -Url $Url -ApiKey $ApiKey -FailOnConflict:$FailOnConflict } |