I am trying to replicate the following Azure pipeline using the CLI dotnet command:
- task: DotNetCoreCLI@2
inputs:
command: publish
publishWebProjects: True
arguments: '--configuration Release --output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: True
So far, I can make the project build, but getting a zip file out of it seems problematic - passing the inputs zipAfterPublish etc appears impossible to pass, although, there is some scattered documentation suggesting these can be passed with -p:"optiona=x;optionb=y" or /p:"optiona=x;optionb=y". I can find no definitive documentation on this.
This is what I have - the build part works, the $PWD/out directory is populated with many files but nothing is zipped:
dotnet publish --configuration Release --output $PWD/out /p:"zipAfterPublish=true;publishWebProjects=true"
I'm guessing this is around how to pass the inputs ( https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops ) correctly to the command.