Update cibuildwheels to include python 3.13 (#7) #21
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: build and publish | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- v* | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
#fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup msys2 | |
if: matrix.os == 'windows-latest' | |
uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: mingw-w64-x86_64-gcc | |
- name: Set path | |
if: matrix.os == 'windows-latest' | |
run: echo "$env:RUNNER_TEMP\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
# - name: Add CC=gcc environment variable | |
# if: matrix.os == 'windows-latest' | |
# run: | | |
# echo "CC=gcc" | Out-File -FilePath $env:GITHUB_ENV -Append | |
# echo "LDSHARED='gcc -shared'" | Out-File -FilePath $env:GITHUB_ENV -Append | |
# echo "AR=gcc-ar" | Out-File -FilePath $env:GITHUB_ENV -Append | |
# echo "ARFLAGS=' '" | Out-File -FilePath $env:GITHUB_ENV -Append | |
# echo "CCFLAGS=' '" | Out-File -FilePath $env:GITHUB_ENV -Append | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
# if: ${{ github.event_name == 'workflow_dispatch' }} | |
- name: Build wheels | |
uses: pypa/[email protected] | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: dist/*.tar.gz | |
publish: | |
name: Publish to PyPi | |
runs-on: ubuntu-latest | |
needs: build_wheels | |
if: success() || failure() | |
steps: | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v3 | |
- name: Use Twine to Publish | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
pip install twine | |
twine upload ./artifact/*.whl |