Skip to content

πŸ”– Bump version to 0.1.9 #13

πŸ”– Bump version to 0.1.9

πŸ”– Bump version to 0.1.9 #13

Workflow file for this run

name: Publish Python Package
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write # For PyPI trusted publishing
contents: write # For creating GitHub releases
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for tags and branches
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine==6.0.1 setuptools==75.6.0
- name: Extract version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Update version in pyproject.toml
run: |
sed -i "s/version = \"[0-9]*\.[0-9]*\.[0-9]*\"/version = \"$VERSION\"/" pyproject.toml
cat pyproject.toml
- name: Build package
run: python -m build
- name: Publish package to PyPI
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
name: Release v${{ env.VERSION }}
draft: false
prerelease: false
generate_release_notes: true
files: |
dist/*.whl
dist/*.tar.gz