Skip to content

Build and upload wheels and sdist #128

Build and upload wheels and sdist

Build and upload wheels and sdist #128

# See the Python documentation: https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
# and cibuildwheel: https://cibuildwheel.readthedocs.io/en/stable/
name: Build and upload wheels and sdist
on:
push:
tags:
- pyat-[0-9]*
workflow_dispatch:
jobs:
build_wheels:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
with:
# Necessary to fetch tags and allow setuptools_scm
# see: https://github.com/pypa/setuptools_scm/issues/480
fetch-depth: 0
- name: Build wheels
uses: pypa/[email protected]
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels
path: ./wheelhouse/*.whl
if-no-files-found: error
build_sdist:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
# Necessary to fetch tags and allow setuptools_scm
# see: https://github.com/pypa/setuptools_scm/issues/480
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install build tools
run: python -m pip install build
- name: Build sdist
run: python -m build --sdist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: tar.gz
path: ./dist/*.tar.gz
if-no-files-found: error