Skip to content

Commit 60fd1ae

Browse files
committed
.github/workflows/dist.yml: Upload wheels as artifact
1 parent ec41d2b commit 60fd1ae

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

.github/workflows/dist.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ concurrency:
1313
jobs:
1414

1515
sdists_for_pypi:
16-
name: Build sdist (and upload to PyPI on release tags)
16+
name: Build sdist
1717
runs-on: ubuntu-latest
18-
env:
19-
CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' }}
2018
steps:
2119
- uses: actions/checkout@v4
2220
- uses: actions/setup-python@v4
@@ -28,13 +26,6 @@ jobs:
2826
with:
2927
path: "dist/*.tar.gz"
3028
name: dist
31-
- uses: pypa/gh-action-pypi-publish@release/v1
32-
with:
33-
user: __token__
34-
password: ${{ secrets.SAGEMATH_PYPI_API_TOKEN }}
35-
skip_existing: true
36-
verbose: true
37-
if: env.CAN_DEPLOY == 'true' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
3829

3930
build_wheels:
4031
name: Build wheels on ${{ matrix.os }}, arch ${{ matrix.arch }}
@@ -144,6 +135,12 @@ jobs:
144135
"${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.21.3 unpacked/$pkg*
145136
done
146137
138+
- uses: actions/upload-artifact@v4
139+
if: always()
140+
with:
141+
name: ${{ matrix.os }}-${{ matrix.build }}-${{ matrix.arch }}-wheels
142+
path: ./wheelhouse/*.whl
143+
147144
build_wheels_windows:
148145
name: Build wheels on ${{ matrix.os }} using ${{ matrix.env }}
149146
runs-on: ${{ matrix.os }}
@@ -343,8 +340,8 @@ jobs:
343340

344341
pypi-publish:
345342
# https://github.com/pypa/gh-action-pypi-publish
346-
name: Upload wheels to PyPI
347-
needs: build_wheels
343+
name: Upload to PyPI
344+
needs: [build_wheels, build_wheels_windows]
348345
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
349346
runs-on: ubuntu-latest
350347
env:

0 commit comments

Comments
 (0)