File tree Expand file tree Collapse file tree 1 file changed +31
-2
lines changed
Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Original file line number Diff line number Diff line change 11---
22# Adapted from:
33# https://github.com/pypa/cibuildwheel?tab=readme-ov-file#example-setup
4+ # https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
45name : Spark-DSG Wheels
5- on : {release: {types: [published]}}
6+ on : {workflow_dispatch: {}, push: {branches: {main}} release: {types: [published]}}
67jobs :
78 build_wheels :
89 name : Build wheels on ${{ matrix.os }}
1112 matrix :
1213 os : [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest]
1314 steps :
14- - uses : actions/checkout@v4
15+ - uses : actions/checkout@v5
1516 - uses : actions/setup-python@v5
1617 - name : Install cibuildwheel
1718 run : python -m pip install cibuildwheel
2122 with :
2223 name : cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
2324 path : ./wheelhouse/*.whl
25+ build_sdist :
26+ name : Build source distribution
27+ runs-on : ubuntu-latest
28+ steps :
29+ - uses : actions/checkout@v5
30+ - name : Build sdist
31+ run : pipx run build --sdist
32+ - uses : actions/upload-artifact@v4
33+ with :
34+ name : cibw-sdist
35+ path : dist/*.tar.gz
36+ upload_pypi :
37+ needs : [build_wheels, build_sdist]
38+ runs-on : ubuntu-latest
39+ environment : pypi
40+ permissions :
41+ id-token : write
42+ if : github.event_name == 'release' && github.event.action == 'published'
43+ steps :
44+ - uses : actions/download-artifact@v5
45+ with :
46+ pattern : cibw-*
47+ path : dist
48+ merge-multiple : true
49+ # - uses: pypa/gh-action-pypi-publish@release/v1
50+ # To test uploads to TestPyPI, uncomment the following:
51+ # with:
52+ # repository-url: https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments