Skip to content

Commit

Permalink
Update python-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijeet-plato authored Oct 16, 2023
1 parent 7d358df commit 8de493a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,26 @@ jobs:
sudo apt update
sudo apt install gh
- name: Bump version and create a pull request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
# Create a new branch
git checkout -b bump-version
NEW_VERSION=$(python -c 'version = open("VERSION").read().strip().split("."); version[-1] = str(int(version[-1]) + 1); print(".".join(version))')
echo $NEW_VERSION > VERSION
git add VERSION
git commit -m "Bump version to $NEW_VERSION"
git push origin bump-version
# Create a pull request using GitHub CLI
gh pr create --base main --head bump-version --title "Bump version to $NEW_VERSION" --body "Automatic version bump to $NEW_VERSION"
create_release:
needs: bump_version
runs-on: ubuntu-latest
Expand Down

0 comments on commit 8de493a

Please sign in to comment.