Skip to content

Build

Build #72

Workflow file for this run

name: Build
on:
pull_request:
paths:
# build wheels in PR if this file changed
- ".github/workflows/build.yml"
# build wheels in PR if any of the build system files changed
- "**/setup.py"
- "**/pyproject.toml"
- "**/MANIFEST.in"
schedule:
# check the build once a week on mondays
- cron: "0 10 * * 1"
workflow_dispatch:
# allow manual triggering of the workflow
jobs:
build-wheels:
name: wheels / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025, macos-15-intel, macos-15]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Build wheels
uses: pypa/cibuildwheel@v3.3.1
- uses: actions/upload-artifact@v7
with:
name: wheel-${{ matrix.os }}
path: ./wheelhouse/*.whl
build-sdist:
name: sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: setup Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
check-latest: true
- name: Install dependencies
run: python -m pip install wheel build tox
- name: Test build integrity and build sdist
run: tox -e build
- uses: actions/upload-artifact@v7
with:
name: sdist
path: dist/*.tar.gz
release:
name: Release package
if: startsWith(github.ref, 'refs/tags/v') && github.event_name == 'workflow_dispatch'
needs: [build-wheels, build-sdist]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/scatterkit
permissions:
id-token: write
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v8
with:
path: dist
merge-multiple: true
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish to GitHub release
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.tar.gz
dist/*.whl
prerelease: ${{ contains(github.ref, '-rc') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}