One azure-pipeline.yaml for staging and production
Ok, found it here:
Build.SourceBranch  

The branch of the triggering repo the build was queued for. Some examples:

 - Git repo branch: refs/heads/master 
 - Git repo pull request: refs/pull/1/merge 
 - TFVC repo branch: $/teamproject/main 
 - TFVC repo gated check-in: Gated_2016-06-06_05.20.51.4369;username@live.com 
 - TFVC repo shelveset build: myshelveset;username@live.com

When your pipeline is triggered by a tag: refs/tags/your-tag-name
When you use this variable in your build number format, the forward slash characters (/) are replaced with underscore characters _).

Note: In TFVC, if you are running a gated check-in build or manually building a shelveset, you cannot use this variable in your build number format.