title: VSTS - Is there a way to only run a task if a specific task has failed?
body: <p>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.</p>
  
  <p>Is there a way of doing this?</p>
  
  <p>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.</p>
  
  <p>I can't see how to set an output variable if the task fails. Is this possible?</p>