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 13
13
name : Wheel builder
14
14
15
15
on :
16
+ release :
17
+ types : [published]
16
18
schedule :
17
19
# 3:27 UTC every day
18
20
- cron : " 27 3 * * *"
@@ -208,3 +210,41 @@ jobs:
208
210
source ci/upload_wheels.sh
209
211
set_upload_vars
210
212
upload_wheels
213
+
214
+ publish :
215
+ if : >
216
+ github.repository == 'pandas-dev/pandas' &&
217
+ github.event_name == 'release' &&
218
+ startsWith(github.ref, 'refs/tags/v')
219
+
220
+ needs :
221
+ - build_sdist
222
+ - build_wheels
223
+
224
+ runs-on : ubuntu-latest
225
+
226
+ environment :
227
+ name : pypi
228
+ permissions :
229
+ id-token : write # OIDC for Trusted Publishing
230
+ contents : read
231
+
232
+ steps :
233
+ - name : Download all artefacts
234
+ uses : actions/download-artifact@v4
235
+ with :
236
+ path : dist # everything lands in ./dist/**
237
+
238
+ - name : Collect files
239
+ run : |
240
+ mkdir -p upload
241
+ # skip any wheel that contains 'pyodide'
242
+ find dist -name '*pyodide*.whl' -prune -o \
243
+ -name '*.whl' -exec mv {} upload/ \;
244
+ find dist -name '*.tar.gz' -exec mv {} upload/ \;
245
+
246
+ - name : Publish to **PyPI** (Trusted Publishing)
247
+ uses : pypa/gh-action-pypi-publish@release/v1
248
+ with :
249
+ packages-dir : upload
250
+ 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.
467
467
- Set as the latest release: Leave checked, unless releasing a patch release for an older version
468
468
(e.g. releasing 1.4.5 after 1.5 has been released)
469
469
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.
473
474
474
475
6. The GitHub release will after some hours trigger an
475
476
`automated conda-forge PR <https://github.com/conda-forge/pandas-feedstock/pulls >`_.
You can’t perform that action at this time.
0 commit comments