title: How to use variables while matching branches in gitlab-ci?
body: <p>How can I match a branch name a variable? If I set the variable to 1.1.0 I want it to only match release branches that are for that version. I can't seem to do variable replacement here or in a regex (as seen commented out). Are there any options? The 1.1.0 would actually be coming from the project variables, not hard coded in the file so hard coding it really isn't an option here.</p>
  
  <p>This does not seem to do variable replacement.</p>
  
  <pre><code>stages:
    - build
  
  variables:
    buildNum: $CI_PIPELINE_ID
    stagingVersion: 1.1.0
  
  before_script:
    - export MYTEAM_BUILD_NUM=${buildNum}
    - export MYTEAM_VERSION=${stagingVersion}
  
  build_staging:
    stage: build
    only:
      - release/v${stagingVersion}@myTeam/myProject
      # - /^release\/v${stagingVersion}@myTeam\/myProject$/
    script:
      - doStuff
  </code></pre>