fix: add patch version #32
Workflow file for this run
This file contains 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: Upload Python Package to PyPI | |
on: | |
push: | |
tags: ["v*"] | |
jobs: | |
build_wheels: | |
name: Build wheels for cp${{ matrix.python-version }}-${{ matrix.os-platform[1] }} | |
runs-on: ${{ matrix.os-platform[0] }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [39, 310, 311, 312] | |
os-platform: | |
[ | |
[ubuntu-latest, manylinux_x86_64], | |
[ubuntu-latest, manylinux_aarch64], | |
[windows-latest, win_amd64], | |
[macos-13, macosx_x86_64], | |
[macos-14, macosx_arm64], | |
] | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: "true" | |
- name: Set up QEMU | |
if: matrix.os-platform[1] == 'manylinux_aarch64' | |
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 | |
with: | |
platforms: arm64 | |
- name: Build wheels | |
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0 | |
env: | |
CIBW_BUILD: cp${{ matrix.python-version }}-${{ matrix.os-platform[1] }} | |
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: artifact-cp${{ matrix.python-version }}-${{ matrix.os-platform[1] }} | |
path: wheelhouse/*.whl | |
retention-days: 1 | |
build_sdist: | |
name: Build sdist | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: "true" | |
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: "3.10" | |
- name: Build sdist | |
run: | | |
python -m pip install build | |
python -m build --sdist --outdir dist | |
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
path: dist/*.tar.gz | |
upload: | |
name: Upload to PyPI | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
path: dist | |
merge-multiple: true | |
- uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2 |