I have a CI build on one of my projects on VSTS that is triggered by changes on the specified GIT branch.
One of the build steps is to create packages and push them to a private nuget feed for use into other projects. It uses the .NET Core 2.* task with pack command.
On each successful build, one new package is generated for every project in the branch, despite it had been changed or not.
Is there a way to make the task skip unchanged projects?
There's no way to skip packing of projects, unfortunately. However, if you manually control your version numbers, you can package all projects then use the NuGet step to publish only packages where the version doesn't already exist in the feed. Use push
for the command and select the Allow duplicates to be skipped
checkbox.