Skip to content

Python Packaging

Python Packaging #44

Workflow file for this run

---
name: Python Packaging
on:
workflow_run:
workflows: ["Validate"]
types:
- completed
jobs:
install:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# see https://github.com/actions/runner-images#available-images
os: [macos-14, ubuntu-latest]
python-version: ['3.12']
steps:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: git checkout
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
submodules: true
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.21.3
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
- name: Build sdist
if: ${{ matrix.os == 'ubuntu-latest' }}
run: ./build-sdist.sh
- name: List wheels
run: ls -l ./wheelhouse
- name: Upload
if: ${{ github.ref_name == 'master' }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
pip install twine
twine upload --verbose --skip-existing wheelhouse/*