-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (80 loc) · 2.29 KB
/
Copy pathbuild.yml
File metadata and controls
95 lines (80 loc) · 2.29 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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.4.0
- 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 }}