Summary
Pushes NuGet packages to a NuGet server and publishes them.
- Namespace
- Cake
.Common .Tools .NuGet - Containing Type
- NuGetAliases
Syntax
[CakeMethodAlias]
[CakeAliasCategory("Push")]
[CakeNamespaceImport("Cake.Common.Tools.NuGet.Push")]
public static void NuGetPush(this ICakeContext context, IEnumerable<FilePath> packageFilePaths, NuGetPushSettings settings)
Examples
NOTE: Starting with NuGet 3.4.2, the Source parameter is a mandatory parameter.
It is strongly recommended that you ALWAYS set the Source property within the NuGetPushSettings
instance.
// Get the paths to the packages.
var packages = GetFiles("./**/*.nupkg");
// Push the package.
NuGetPush(packages, new NuGetPushSettings {
Source = "http://example.com/nugetfeed",
ApiKey = "4003d786-cc37-4004-bfdf-c4f3e8ef9b3a"
});
Attributes
Type | Description |
---|---|
Cake |
An attribute used to mark script method aliases. |
Cake |
An attribute used for documentation of alias methods/properties. |
Cake |
An attribute used to hint Cake about additional namespaces that need to be imported for an alias to work. This attribute can mark an extension method, the extension method class, or the assembly to provide a global set of imports. |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | The context. |
packageFilePaths | IEnumerable |
The .nupkg file paths. |
settings | NuGetPushSettings | The settings. |
Return Value
Type | Description |
---|---|
void |