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
27 changes: 22 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,31 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install poetry
python -m pip install build twine

- name: Bump version
run: |
# Get the current version
current_version=$(poetry version -s)
echo "Current version: $current_version"

# Bump patch version
poetry version patch
new_version=$(poetry version -s)
echo "Bumped to version: $new_version"

# Commit the version change
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
git commit -am "Bump version to $new_version [skip ci]"
git push

- name: Build and publish
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
# Build the package
python -m build
# Build the package using poetry
poetry build

# Publish to PyPI
python -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/* --username __token__ --password $PYPI_API_TOKEN
# Publish to PyPI using poetry
poetry config pypi-token.pypi $PYPI_API_TOKEN
poetry publish