From 3215cc5488f6ebd8e7a17bb299ba871341938a6b Mon Sep 17 00:00:00 2001 From: Pablo Date: Tue, 19 Mar 2024 12:16:16 +0100 Subject: [PATCH] Update release start job (#3549) * release_start workflow * Update release-start.yml --------- Co-authored-by: manu --- .github/workflows/release-start.yml | 45 +++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release-start.yml b/.github/workflows/release-start.yml index bc85cca7c0..538e250e51 100644 --- a/.github/workflows/release-start.yml +++ b/.github/workflows/release-start.yml @@ -39,15 +39,6 @@ jobs: git config user.name "GitHub Actions Bot" git config user.email "" - - name: Run Python script to update base branch version - run: python scripts/updateVersionName.py ${{ inputs.development_version_name }} - - - name: Commit and Push Changes - run: | - git add . - git commit -m "Update version to ${{ inputs.development_version_name }}" - git push - # override vName with new version - name: Create release branch run: git checkout -b release/${{ inputs.release_version_name }} @@ -60,3 +51,39 @@ jobs: git add . git commit -m "Update version to ${{ inputs.release_version_name }}" git push origin release/${{ inputs.release_version_name }} + + update_version: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.12.1 + + - name: setup git config + run: | + # setup the username and email. + git config user.name "GitHub Actions Bot" + git config user.email "" + + - name: Create release branch + run: git checkout -b update_version_to${{ inputs.development_version_name }} + + - name: Run Python script to update base branch version + run: python scripts/updateVersionName.py ${{ inputs.development_version_name }} + + - name: Commit and Push Changes + run: | + git add . + git commit -m "Update version to ${{ inputs.development_version_name }}" + git push origin update_version_to${{ inputs.development_version_name }} + + - name: create pull request + run: gh pr create -B develop -H update_version_to${{ inputs.development_version_name }} --title 'Merge update_version_to${{ inputs.development_version_name }} into develop' --body 'Created by Github action' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}