@@ -3,19 +3,25 @@ on: [push, pull_request]
33
44jobs :
55 build-wheels :
6- name : Build wheels on ${{ matrix.os }}
7- runs-on : ${{ matrix.os }}
6+ name : Build wheels for ${{ matrix.os }}
7+ runs-on : ${{ matrix.runs-on }}
88 strategy :
99 matrix :
10- os :
11- - ubuntu-latest
12- - ubuntu-24.04-arm
13- - windows-latest
14- - macos-13 # intel
15- - macos-latest # arm64
10+ - os : linux-intel
11+ runs-on : ubuntu-latest
12+ - os : linux-arm
13+ runs-on : ubuntu-24.04-arm
14+ - os : windows-intel
15+ runs-on : windows-latest
16+ - os : macos-intel
17+ runs-on : macos-13
18+ - os : macos-arm
19+ runs-on : macos-latest
1620
1721 steps :
1822 - uses : actions/checkout@v4
23+ with :
24+ fetch-depth : 0
1925
2026 - name : Build wheels
2127 uses : pypa/cibuildwheel@v3.0.0
@@ -25,12 +31,38 @@ jobs:
2531 name : cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
2632 path : ./wheelhouse/*.whl
2733
28- # - name: Publish package to PyPI
29- # # Only actually publish if a new tag was pushed
30- # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
31- # # We can't use the pypa action because of https://github.com/pypa/gh-action-pypi-publish/issues/15
32- # run: |
33- # pip install twine
34- # TWINE_USERNAME="__token__" \
35- # TWINE_PASSWORD="${{ secrets.pypi_password }}" \
36- # twine upload dist/*
34+ - name : Coveralls
35+ uses : coverallsapp/github-action@v2
36+
37+ build-sdist :
38+ name : Build source distribution
39+ runs-on : ubuntu-latest
40+ steps :
41+ - uses : actions/checkout@v4
42+ with :
43+ fetch-depth : 0
44+
45+ - name : Build sdist
46+ run : pipx run build --sdist
47+
48+ - uses : actions/upload-artifact@v4
49+ with :
50+ name : cibw-sdist
51+ path : dist/*.tar.gz
52+
53+ upload-pypi :
54+ needs : [build-wheels, build-sdist]
55+ runs-on : ubuntu-latest
56+ environment : pypi
57+ permissions :
58+ id-token : write
59+ if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
60+ steps :
61+ - uses : actions/download-artifact@v4
62+ with :
63+ pattern : cibw-*
64+ path : dist
65+ merge-multiple : true
66+
67+ - uses : pypa/gh-action-pypi-publish@release/v1
68+ with :
0 commit comments