diff --git a/.github/workflows/release-start.yml b/.github/workflows/release-start.yml index 15c9a11057..d68fbc01e2 100644 --- a/.github/workflows/release-start.yml +++ b/.github/workflows/release-start.yml @@ -26,6 +26,7 @@ jobs: env: RELEASE_VERSION: ${{ inputs.release_version_name }} RELEASE_BRANCH: 'release/${{ inputs.release_version_name }}' + TEMP_RELEASE_BRANCH: 'tmp_release/${{ inputs.release_version_name }}' steps: - name: Check out code @@ -41,9 +42,8 @@ jobs: # override vName with new version - name: Create release branch run: | - git config --list - git checkout -b ${{ env.RELEASE_BRANCH }} - git push origin ${{ env.RELEASE_BRANCH }} + git checkout -b ${{ env.TEMP_RELEASE_BRANCH }} + git push origin ${{ env.TEMP_RELEASE_BRANCH }} - name: Run Python script to update release branch version run: python scripts/updateVersionName.py ${{ env.RELEASE_VERSION }} @@ -52,9 +52,15 @@ jobs: uses: flex-development/gh-commit@1.0.0 with: message: 'Update version to ${{ env.RELEASE_VERSION }}' - ref: ${{ env.RELEASE_BRANCH }} + ref: ${{ env.TEMP_RELEASE_BRANCH }} token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} + - name: Change to release branch + run: | + git checkout -b ${{ env.RELEASE_BRANCH }} + git push origin ${{ env.RELEASE_BRANCH }} + git push origin --delete ${{ env.TEMP_RELEASE_BRANCH }} + update_version: if: false # The type of runner that the job will run on