Skip to content

v0.2.0 Release Notes #20

v0.2.0 Release Notes

v0.2.0 Release Notes #20

Workflow file for this run

name: Publish to PyPI
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Debug environment
run: |
echo "==== Current directory contents ===="
ls -la
echo "==== pyproject.toml content ===="
cat pyproject.toml
echo "==== Git information ===="
git describe --tags || echo "No tags found"
git rev-parse HEAD
- name: Clean and force version
run: |
rm -rf dist/ build/ *.egg-info/
# Force the version directly before building
sed -i 's/version = "0.[0-9].[0-9]"/version = "0.2.0"/g' pyproject.toml
echo "==== Modified pyproject.toml ===="
cat pyproject.toml
# Also check for any version in Python files
find . -name "__init__.py" -type f -exec grep -l "__version__" {} \; | xargs -I{} sed -i 's/__version__ = "0.[0-9].[0-9]"/__version__ = "0.2.0"/g' {}
- name: Build package with verbose output
run: |
python -m build --verbose
echo "==== Built package contents ===="
ls -la dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true
skip-existing: true