Skip to content

1.2.0

1.2.0 #113

Workflow file for this run

name: Build wheels, sdist, and upload to PyPI (only on release!)
on:
release:
types: [published]
workflow_dispatch:
push:
branches:
- "rc-v*.*.*"
pull_request:
paths:
- .github/workflows/wheels.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, macos-15-intel, macos-latest]
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
# Used to host cibuildwheel
- name: Build wheel
uses: pypa/cibuildwheel@v3.3.0
with:
output-dir: wheelhouse
- uses: actions/upload-artifact@v6
with:
name: cibw-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
make-sdist:
name: Make source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install libsemigroups
run: source etc/make-libsemigroups.sh && sudo make install
- name: Build SDist
run: uv build --sdist
- uses: actions/upload-artifact@v6
with:
name: sdist
path: dist/*.tar.gz
# TODO(1): Add a TestPyPI step
publish-to-pypi:
if: ${{ github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
name: Publish Python distribution to PyPI
needs:
- build-wheels
- make-sdist
runs-on: ubuntu-latest
# TODO(1): Uncomment below and configure a publishing environment
# See https://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/manage-environments
# environment:
# name: pypi
# url: https://pypi.org/p/libsemigroups-pybind11/
permissions:
id-token: write
steps:
- name: Download wheels and sdist artifacts
uses: actions/download-artifact@v7
with:
# Here, we could specify a name of an artifact, or a pattern that
# matches the names of artifacts. However, by not specifying these
# values, all of the artifacts from this run are downloaded (which is
# what we want).
# Destination path
path: dist
# If true, the downloaded artifacts will be in the same directory
# specified by path.
# If false, the downloaded artifacts will be extracted into individual
# named directories within the specified path.'
merge-multiple: true
- name: List directory contents
run: ls dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1