One azure-pipeline.yaml for staging and production Currently I have two separate Azure DevOps Pipeline config files:

azure-pipelines-staging.yaml
azure-pipelines-production.yaml

Really the only differences in them are the:
trigger:
  branches:
    include:
    - master # or staging

And the directory where my k8s manifests are:
manifests: |
  $(Pipeline.Workspace)/manifests/azure/prod/api.yaml

# or 

manifests: |
  $(Pipeline.Workspace)/manifests/azure/staging/api.yaml

So ideally it would be something like:
trigger:
  branches:
    include:
    - master
    - staging
...
manifests: |
  $(Pipeline.Workspace)/manifests/azure/$(branch)/api.yaml

Not quite seeing how to get $(branch) name in there. Suggestions?
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.