File tree Expand file tree Collapse file tree 2 files changed +44
-3
lines changed Expand file tree Collapse file tree 2 files changed +44
-3
lines changed Original file line number Diff line number Diff line change 1313name : Wheel builder
1414
1515on :
16+ release :
17+ types : [published]
1618 schedule :
1719 # 3:27 UTC every day
1820 - cron : " 27 3 * * *"
@@ -206,3 +208,41 @@ jobs:
206208 source ci/upload_wheels.sh
207209 set_upload_vars
208210 upload_wheels
211+
212+ publish :
213+ if : >
214+ github.repository == 'pandas-dev/pandas' &&
215+ github.event_name == 'release' &&
216+ startsWith(github.ref, 'refs/tags/v')
217+
218+ needs :
219+ - build_sdist
220+ - build_wheels
221+
222+ runs-on : ubuntu-latest
223+
224+ environment :
225+ name : pypi
226+ permissions :
227+ id-token : write # OIDC for Trusted Publishing
228+ contents : read
229+
230+ steps :
231+ - name : Download all artefacts
232+ uses : actions/download-artifact@v4
233+ with :
234+ path : dist # everything lands in ./dist/**
235+
236+ - name : Collect files
237+ run : |
238+ mkdir -p upload
239+ # skip any wheel that contains 'pyodide'
240+ find dist -name '*pyodide*.whl' -prune -o \
241+ -name '*.whl' -exec mv {} upload/ \;
242+ find dist -name '*.tar.gz' -exec mv {} upload/ \;
243+
244+ - name : Publish to **PyPI** (Trusted Publishing)
245+ uses : pypa/gh-action-pypi-publish@release/v1
246+ with :
247+ packages-dir : upload
248+ skip-existing : true
Original file line number Diff line number Diff line change @@ -467,9 +467,10 @@ which will be triggered when the tag is pushed.
467467 - Set as the latest release: Leave checked, unless releasing a patch release for an older version
468468 (e.g. releasing 1.4.5 after 1.5 has been released)
469469
470- 5. Upload wheels to PyPI::
471-
472- twine upload pandas/dist/pandas-<version>*.{whl,tar.gz} --skip-existing
470+ 5. Verify wheels are uploaded automatically by GitHub Actions
471+ via `**Trusted Publishing** <https://docs.pypi.org/trusted-publishers/ >`__
472+ when the GitHub `*Release* <https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases >`__
473+ is published. Do not run ``twine upload `` manually.
473474
4744756. The GitHub release will after some hours trigger an
475476 `automated conda-forge PR <https://github.com/conda-forge/pandas-feedstock/pulls >`_.
You can’t perform that action at this time.
0 commit comments