Skip to content

Commit

Permalink
Workaround protected branches
Browse files Browse the repository at this point in the history
  • Loading branch information
vgarciabnz committed Nov 18, 2024
1 parent 71ee3d7 commit 4866268
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/release-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand All @@ -52,9 +52,15 @@ jobs:
uses: flex-development/[email protected]
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
Expand Down

0 comments on commit 4866268

Please sign in to comment.