Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 39 additions & 34 deletions .github/workflows/pypi-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,37 @@ on:
release:
types: [published]

env:
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-*
CIBW_BEFORE_BUILD: pip install cython
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
push:
branches: [ci-debug]

pull_request:
branches:
- master
- develop

jobs:
build_wheels:
name: Build wheels on [ ubuntu-latest ]
runs-on: [ ubuntu-latest ]
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] #, windows-latest]
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.10'

- name: Install cibuildwheel
run: |
# python -m pip install cibuildwheel
pip install -U setuptools setuptools_scm wheel
- name: Build wheels
run: |
# python -m cibuildwheel --output-dir wheelhouse
python setup.py bdist_wheel
uses: pypa/cibuildwheel@v2.21.1
env:
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-*
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014

- uses: actions/upload-artifact@v4
with:
name: artifact-wheel-${{ matrix.os }}
path: ./dist/*.whl
name: artifact-wheel-${{ matrix.os }}
path: ./wheelhouse/*.whl


build_sdist:
Expand All @@ -53,14 +49,13 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.10'
python-version: '3.12'

- name: Install setuptools
run: |
pip install -U setuptools setuptools_scm wheel

pip install -U setuptools setuptools_scm wheel build
- name: Build sdist
run: python setup.py sdist
run: python -m build . --sdist

- uses: actions/upload-artifact@v4
with:
Expand All @@ -70,24 +65,34 @@ jobs:
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
# 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@v4
with:
name: artifact-sdist
path: dist

# - uses: actions/download-artifact@v4
# with:
# name: artifact-wheel-windows-latest
# path: dist
- uses: actions/download-artifact@v4
with:
name: artifact-wheel-windows-latest
path: dist

- uses: actions/download-artifact@v4
with:
name: artifact-wheel-ubuntu-latest
path: dist

- uses: pypa/gh-action-pypi-publish@v1.10.2
- 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:
user: __token__
password: ${{ secrets.upload_pypi }}
verbose: true
repository-url: https://test.pypi.org/legacy/
Loading