forked from atcollab/at
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 1.69 KB
/
build-python-wheels.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# 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: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Build wheels
uses: pypa/[email protected]
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
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