I had this issue and fixed it by uploading the azure-pipelines.yml file to the main branch - I could then select it. Initially I just had the yml file in my releases branch.