Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,27 @@ jobs:
with:
python-version: "3.10"

- name: current_version
run: echo "current_version=$(grep 'version = ' pyproject.toml | cut -d '=' -f2 | tr -d ' "')" >> $GITHUB_ENV

- name: Install bump2version
run: pip install bump2version

- name: Bump version and commit changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
bump2version patch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: new_version
run: echo "new_version=$(grep 'version = ' pyproject.toml | cut -d '=' -f2 | tr -d ' "')" >> $GITHUB_ENV

- name: Push changes
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git push
git push --tags
env:
Expand All @@ -43,6 +51,9 @@ jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest
# Only run this job when the `bump_version` job is successful
needs:
- bump_version

steps:
- uses: actions/checkout@v4
Expand Down
Loading