Skip to content

Publish

Publish #3

Workflow file for this run

name: Publish
on:
release:
types:
# Note: editing the prerelease then marking as release does not trigger
# this pipeline
# - prereleased
- released
workflow_dispatch:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
#os: [ubuntu-latest, windows-latest, macos-13, macos-14]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine
- name: Build wheels
uses: pypa/[email protected]
# env:
# CIBW_SOME_OPTION: value
# ...
# with:
# package-dir: .
# output-dir: wheelhouse
# config-file: "{package}/pyproject.toml"
- name: Publish PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
ls -lh wheelhouse
twine upload wheelhouse/*
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl