Azure DevOps Build/Release Task. Set Azure DevOps variable NFN.NextFolderName with next folder name incremented from existing names. E.g. RC3, if RC1 & RC2 already exist.
Provide argument values,
Result will be variable NFN.NextFolderName set to the value.
Publish to a path viz:
This task can be used in build as well as release pipeline.