Skip to content
Somatic edited this page Sep 7, 2013 · 2 revisions

The NuGet Push task allow publishing NuGet Package into NuGet Gallery or any other server.

Example

grunt.initConfig({
    nugetpush: {
        dist: {
            src: 'tests/Package.nupkg',

            options: {
                apiKey: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
            }
        }
    }
});

You can find more options on this page.

src

type: string, array | required

Specify input files to build. Accept globbing patterns

options

type: object | optional

Additionnal Options

options.source

type: string | optional | default: 'nuget.org or NuGet.config's DefaultPushSource '

Specifies the server URL. If not specified, nuget.org is used unless DefaultPushSource config value is set in the NuGet config file. Starting with NuGet 2.5, if NuGet.exe identifies a UNC/folder source, it will perform the file copy to the source.

options.apiKey

type: string | optional

The API key for the server. In order to avoid specifying your API Key inside your package you can use command line task (more informations)

options.timeout

type: number | optional | default: '300'

Specifies the timeout for pushing to a server in seconds. Defaults to 300 seconds (5 minutes).

options.configFile

type: string | optional | default: '%AppData%\NuGet\NuGet.config'

The NuGet configuation file. If not specified, file %AppData%\NuGet\NuGet.config is used as configuration file.

Clone this wiki locally