Skip to content

Wheel builder

Wheel builder #1

Workflow file for this run

name: Wheel builder
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build source distribution
run: |
python -m pip install -U pip build
python -m build --sdist
- name: Test source distribution
run: |
python -m pip install dist/*.gz
cd .. # Can't import millenniumdb_driver within millenniumdb_driver's src directory
python -c "import millenniumdb_driver, sys; print(millenniumdb_driver.__version__); sys.exit(0)"
- name: Check README rendering for PyPI
run: |
python -m pip install twine
python -m twine check dist/*.gz
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.gz
if-no-files-found: error
- name: check
run: du .
publish_to_pypi:
needs: build
name: Upload release to PyPI
runs-on: ubuntu-22.04
steps:
- name: Download packages
uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- name: Print out all packages
run: ls -lhS dist
- name: Publish package distribuions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
username: __token__
password: ${{ secrets.PYPI_API_TOKEN }}