Skip to content

Commit

Permalink
Update python-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kulbachcedric authored Aug 1, 2022
1 parent bb9962e commit 73fb463
Showing 1 changed file with 17 additions and 43 deletions.
60 changes: 17 additions & 43 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,50 +16,24 @@ permissions:
contents: read

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

steps:
- uses: actions/checkout@v2

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: "cp38-* cp39-* cp310-*"
CIBW_BEFORE_BUILD: "pip install cython"
CIBW_BUILD_VERBOSITY: "1"

- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- uses: pypa/[email protected]
with:
user: ${{ secrets.pypi_user }}
password: ${{ secrets.pypi_password }}
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 73fb463

Please sign in to comment.