Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
28 changes: 11 additions & 17 deletions .github/workflows/build_and_upload_wheels.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Build and upload to PyPI

# Source: https://raw.githubusercontent.com/pypa/cibuildwheel/main/examples/github-deploy.yml

env:
CIBW_SKIP: "cp36-* cp37-*"
# skip EOL interpreters
CIBW_SKIP: "cp36-* cp37-* cp38-*"

# Build on every branch push, tag push, and pull request change:
on:
workflow_dispatch:

Expand All @@ -23,41 +21,37 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]

- uses: actions/upload-artifact@v3
- name: Upload wheels
uses: actions/upload-artifact@v4 # ⬅️ v4
with:
name: wheels-${{ matrix.os }} # ⬅️ unique per job
path: ./wheelhouse/*.whl

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

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

- uses: actions/upload-artifact@v3
- name: Upload sdist
uses: actions/upload-artifact@v4 # ⬅️ v4
with:
name: sdist
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
- name: Download all artifacts
uses: actions/download-artifact@v4 # ⬅️ v4
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist
merge-multiple: true # ⬅️ flatten into one dir

- uses: pypa/[email protected]
with:
user: ${{ secrets.PYPI_USER }}
password: ${{ secrets.PYPI_PROD_PASSWORD }}
verbose: true
# To test: repository_url: https://test.pypi.org/legacy/
Loading