Bump to 0.1.3 and lower minimum Python to 3.10 #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to PyPI | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Trigger on version tags like v0.1.0, v1.0.0, etc. | |
| workflow_dispatch: | |
| inputs: | |
| dry_run: | |
| description: 'Dry run (skip actual upload)' | |
| required: false | |
| default: false | |
| type: boolean | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Linux x86_64 | |
| - os: ubuntu-latest | |
| cibw_archs: "x86_64" | |
| # macOS Intel (x86_64) | |
| - os: macos-15-intel | |
| cibw_archs: "x86_64" | |
| # macOS Apple Silicon (arm64) | |
| - os: macos-15 | |
| cibw_archs: "arm64" | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.4 | |
| env: | |
| CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: wheels-${{ matrix.os }}-${{ matrix.cibw_archs }} | |
| path: ./wheelhouse/*.whl | |
| retention-days: 1 | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build | |
| - name: Build sdist | |
| run: python -m build --sdist | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: sdist | |
| path: dist/*.tar.gz | |
| retention-days: 1 | |
| publish: | |
| name: Publish to PyPI | |
| needs: [build_wheels, build_sdist] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/kh57/ | |
| permissions: | |
| id-token: write # IMPORTANT: Needed for Trusted Publisher (OIDC) | |
| contents: read | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v6 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: List distributions | |
| run: | | |
| ls -lh dist/ | |
| echo "Total wheels: $(ls -1 dist/*.whl 2>/dev/null | wc -l)" | |
| echo "Total sdist: $(ls -1 dist/*.tar.gz 2>/dev/null | wc -l)" | |
| - name: Publish to PyPI | |
| if: ${{ !inputs.dry_run }} | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| skip-existing: true | |
| verbose: true | |
| - name: Dry run mode | |
| if: ${{ inputs.dry_run }} | |
| run: | | |
| echo "DRY RUN MODE - Skipping PyPI upload" | |
| echo "Wheels that would be uploaded:" | |
| ls -lh dist/ |