title: Azure DevOps Release pipeline for create-react-app and GitFlow?
body: <p>We have a creat-react-app application, which includes a couple of variables that are different (react) build time, depending on where the build will be deployed. For example, we need to specify build time which URL will be used, e.g. <a href="https://app-stage.company.com" rel="nofollow noreferrer">https://app-stage.company.com</a> for a <code>release-x.y.z</code> build vs. <a href="https://app.company.com" rel="nofollow noreferrer">https://app.company.com</a> for a <code>master</code> build (please refer to <a href="https://nvie.com/posts/a-successful-git-branching-model/" rel="nofollow noreferrer">this article about GitFlow</a>). We've already created such a build pipeline as suggested <a href="https://stackoverflow.com/questions/54177906/how-to-setup-devops-build-for-creat-react-app-project-with-different-environment">here</a>, which will build with the appropriate react config for any commit to branches <code>master</code>, <code>release-x.y.z</code>, <code>dev</code>, <code>hotfix-x.y.z</code>. </p>
  
  <p>We would like to create a release pipeline now, that reflects the GitFlow process and makes use of the automated builds.</p>
  
  <p>The release pipeline should deploy to a dev site for a <code>dev</code> build, to a stage site for a <code>release-x.y.z</code> build, etc. I know I can inspect the source branch from a build and filter/modify config/variables based on it. Fine, so I can create a release pipeline with a single stage, whose config is modified on the fly based on which source branch was built.</p>
  
  <p>But I understand that release pipelines "should" have a series of stages, i.e. dev -> stage -> production, probably with approvals inbetween. I can't see how this could be achieved in this scenario.</p>
  
  <p>Suggestions?</p>
  
  <p>Our idea as of now is to just have that single modified-on-the-fly stage in the release pipe and handle the stages from git merges/pull requests, according to GitFlow.</p>