Skip to content

Commit c86c2bd

Browse files
author
Release Manager
committed
sagemathgh-38111: GH Actions: Fix upload of macOS wheels to PyPI <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> The change made in sagemath#37099 to accommodate the new design of actions/{up,down}load-artifact@v4 broke the upload of macOS wheels to PyPI (see https://github.com/sagemath/sage/actions/runs/9234698750/job/2 5408786962#step:8:23); this was masked so far because the build of macOS wheels was broken until sagemath#36525. Here we revert to using a separate job that uploads all platform wheels. This uses the new keywords `pattern` and `merge-multiple` of actions/download-artifact@v4 Example run: https://github.com/mkoeppe/sage/actions/runs/9291646178/job/25572343853 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#38111 Reported by: Matthias Köppe Reviewer(s): Kwankyu Lee
2 parents af781fa + 905379e commit c86c2bd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/dist.yml

+14
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,20 @@ jobs:
240240
name: ${{ matrix.os }}-${{ matrix.arch }}-wheels
241241
path: ./wheelhouse/*.whl
242242

243+
upload_wheels:
244+
# This needs to be a separate job because pypa/gh-action-pypi-publish cannot run on macOS
245+
needs: build_wheels
246+
runs-on: ubuntu-latest
247+
env:
248+
CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' }}
249+
steps:
250+
251+
- uses: actions/download-artifact@v4
252+
with:
253+
pattern: "*-*-wheels"
254+
path: wheelhouse
255+
merge-multiple: true
256+
243257
- uses: pypa/gh-action-pypi-publish@release/v1
244258
with:
245259
user: __token__

0 commit comments

Comments
 (0)