I would like to ask you if it possible to create a custom name of zip file using output argument in in yaml task : DotNetCoreCLI@2
My yaml code:
- task: DotNetCoreCLI@2
inputs:
command: 'publish'
publishWebProjects: true
projects: '**/XXXProject.csproj'
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)/newzipname'
zipAfterPublish: true
Current output:
../newzipname/XXXProject.zip
What I would like to achieve:
../newzipname.zip
Thanks in advance for all answers.
It doesn't seem to be supported in DotNetCoreCLI task.
Another option is to add PowerShell task and rename the .zip file produced by DotNetCoreCLI task. You can use Rename-Item
PowerShell command for that.