Skip to content

Instruct users to downgrade setuptools #418

Instruct users to downgrade setuptools

Instruct users to downgrade setuptools #418

Workflow file for this run

name: Build and upload to PyPI
on:
workflow_dispatch:
release:
types: [published]
push:
branches: [ci-debug]
pull_request:
branches:
- master
- develop
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Build wheels release
if: github.event_name == 'release' && github.event.action == 'published'
uses: pypa/cibuildwheel@v3.3.1
env:
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
- name: Build wheels test
if: github.event_name != 'release'
uses: pypa/cibuildwheel@v3.3.1
env:
CIBW_BUILD: cp314-*
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
- uses: actions/upload-artifact@v7
with:
name: artifact-wheel-${{ matrix.os }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v7
name: Install uv
- name: Build sdist
run: uv build --sdist
- uses: actions/upload-artifact@v7
with:
name: artifact-sdist
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for Trusted Publishing
id-token: write
steps:
- uses: actions/download-artifact@v7
with:
name: artifact-sdist
path: dist
- uses: actions/download-artifact@v7
with:
name: artifact-wheel-windows-latest
path: dist
- uses: actions/download-artifact@v7
with:
name: artifact-wheel-ubuntu-latest
path: dist
- name: Publish package distributions to PyPI
if: github.event_name == 'release' && github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@release/v1
# - name: Publish package distributions to PyPI test
# if: github.event_name != 'release'
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# verbose: true
# repository-url: https://test.pypi.org/legacy/