Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
name: Wheel builder

on:
release:
types: [published]
schedule:
# 3:27 UTC every day
- cron: "27 3 * * *"
Expand Down Expand Up @@ -206,3 +208,41 @@ jobs:
source ci/upload_wheels.sh
set_upload_vars
upload_wheels

publish:
if: >
github.repository == 'pandas-dev/pandas' &&
github.event_name == 'release' &&
startsWith(github.ref, 'refs/tags/v')

needs:
- build_sdist
- build_wheels

runs-on: ubuntu-latest

environment:
name: pypi
permissions:
id-token: write # OIDC for Trusted Publishing
contents: read

steps:
- name: Download all artefacts
uses: actions/download-artifact@v4
with:
path: dist # everything lands in ./dist/**

- name: Collect files
run: |
mkdir -p upload
# skip any wheel that contains 'pyodide'
find dist -name '*pyodide*.whl' -prune -o \
-name '*.whl' -exec mv {} upload/ \;
find dist -name '*.tar.gz' -exec mv {} upload/ \;
Comment on lines +236 to +242
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I think this can be done in the actions/download-artifact action by specifying merge-multiple: true and pattern that captures these regexes


- name: Publish to **PyPI** (Trusted Publishing)
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: upload
skip-existing: true
7 changes: 4 additions & 3 deletions doc/source/development/maintaining.rst
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,10 @@ which will be triggered when the tag is pushed.
- Set as the latest release: Leave checked, unless releasing a patch release for an older version
(e.g. releasing 1.4.5 after 1.5 has been released)

5. Upload wheels to PyPI::

twine upload pandas/dist/pandas-<version>*.{whl,tar.gz} --skip-existing
5. Verify wheels are uploaded automatically by GitHub Actions
via `**Trusted Publishing** <https://docs.pypi.org/trusted-publishers/>`__
when the GitHub `*Release* <https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases>`__
is published. Do not run ``twine upload`` manually.

6. The GitHub release will after some hours trigger an
`automated conda-forge PR <https://github.com/conda-forge/pandas-feedstock/pulls>`_.
Expand Down
Loading