Synopsis
Publishes the database project as NuGet package to the NuGet repository.
Description
The Publish task in an Azure DevOps pipeline is used to release or deploy the build artifact to a target environment.
How to create the Publish task
To create the Publish task, select dbForge DevOps Automation for SQL Server – Publish. It will use the package file generated in the Package step as input. As you can see these two tasks have the same file name template. The Publish task settings are shown below.
In the example above, we the package will be published to a local drive. If you want to publish the package on a package server, for example, "https:⁄⁄www.nuget.org", then you will need to set the API key parameter. The value for this parameter will be the token that is issued on this server.
Customization options
Package
ID
Enter the output package file name. The format is as follows: {name}.{major}.{minor}.{build}. You can use the $(Build.BuildNumber) variable to customize it for a build pipeline or the $(Release.ReleaseId) variable to customize it for a release pipeline.
Specify whether the NuGet package is situated in the root directory of the repository or within a specified subfolder path.
NuGet Feed
Enter URL or package source key for the target NuGet feed.
Enter the NuGet feed API key if your deployment target is the NuGet repository.
Control Options
Select to enable the task in your pipeline. If a task is disabled, it will be skipped during the pipeline execution.
Select to continue the pipeline running even if this task fails.
Specify the number of retries for this task that will happen in case of task failure.
Note
This requires agent version 2.194.0 or later. Not supported for agentless tasks.
Specify the maximum time, in minutes, that a task is allowed to execute before being canceled by server. A zero value indicates an infinite timeout.
Specify when this task should run. Choose Custom conditions to specify more complex conditions.
Here you can select from the following options:
Output Variables
Any changes to the reference name will require updates to downstream tasks that uses this reference name, a valid reference name can only contain ‘a-z’, ‘A-Z’, ‘0-9’ and ‘_’.