Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tjorim authored Jan 17, 2025
1 parent ec11cb6 commit b7b3985
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,25 @@ jobs:
- name: Extract version from Git tag
id: version
run: |
VERSION=$(echo ${GITHUB_REF} | sed 's/refs\/tags\///')
VERSION=$(echo ${GITHUB_REF} | sed 's/refs\/tags\/v//') # Strip 'v' prefix
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Bump version in pyproject.toml
run: |
poetry version $VERSION
poetry lock
- name: Create and Checkout a New Branch
run: |
git checkout -b version-bump-${GITHUB_SHA}
- name: Commit version bump to repository
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add pyproject.toml poetry.lock
git commit -m "Bump version to $VERSION"
git push
git push origin version-bump-${GITHUB_SHA}
- name: Build the package and publish to PyPI
env:
Expand Down

0 comments on commit b7b3985

Please sign in to comment.