I need to run a publish task in my build definition but only if a certain task before it has failed. If the other task passes I want this to be ignored and not run.
Is there a way of doing this?
I was hoping that I could set an output variable based on the task success and then use that variable in a custom condition to run the task if it's failed.
I can't see how to set an output variable if the task fails. Is this possible?

