Skip to content

Commit

Permalink
chore: correct bump version workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Aug 3, 2023
1 parent 0476f01 commit e478446
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/bump-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
pull_request:

jobs:
bumpversion:
Expand Down Expand Up @@ -42,9 +43,11 @@ jobs:
- name: Push branch
if: steps.tag_version.outputs.new_version
run: |
git checkout -b bot/v${{ steps.tag_version.outputs.new_version }}
git push -d origin bot/v${{ steps.tag_version.outputs.new_version }}
git push origin bot/v${{ steps.tag_version.outputs.new_version }}
branch_name="bot/v${{ steps.tag_version.outputs.new_version }}"
git fetch --prune origin
git checkout -b $branch_name || git checkout $branch_name
git push --delete origin $branch_name # Delete the branch if it already exists
git push origin $branch_name
- name: Create Pull Request
if: steps.tag_version.outputs.new_version
id: cpr
Expand Down

0 comments on commit e478446

Please sign in to comment.