Skip to content

Commit 7359e1b

Browse files
author
evgenii
committed
CI: trigger wheels workflow on GitHub release (add release:published)
1 parent 58cb179 commit 7359e1b

File tree

2 files changed

+9
-20
lines changed

2 files changed

+9
-20
lines changed

.github/workflows/wheels.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
name: Wheel builder
1414

1515
on:
16+
release:
17+
types: [published]
1618
schedule:
1719
# 3:27 UTC every day
1820
- cron: "27 3 * * *"
@@ -222,7 +224,7 @@ jobs:
222224
223225
publish:
224226
if: >
225-
github.repository == 'evgmosme/pandas' &&
227+
github.repository == 'pandas-dev/pandas' &&
226228
github.event_name == 'push' &&
227229
startsWith(github.ref, 'refs/tags/v')
228230
@@ -233,7 +235,7 @@ jobs:
233235
runs-on: ubuntu-latest
234236

235237
environment:
236-
name: testpypi # must match the Environment in repo settings
238+
name: pypi
237239
permissions:
238240
id-token: write # OIDC for Trusted Publishing
239241
contents: read
@@ -252,22 +254,9 @@ jobs:
252254
-name '*.whl' -exec mv {} upload/ \;
253255
find dist -name '*.tar.gz' -exec mv {} upload/ \;
254256
255-
- name: Publish to **Test PyPI** (Trusted Publishing)
257+
- name: Publish to **PyPI** (Trusted Publishing)
256258
uses: pypa/gh-action-pypi-publish@release/v1
257259
with:
258-
repository-url: https://test.pypi.org/legacy/
260+
repository-url: https://upload.pypi.org/legacy/
259261
packages-dir: upload
260262
skip-existing: true
261-
262-
# environment:
263-
# name: pypi
264-
# permissions:
265-
# id-token: write
266-
# contents: read
267-
#
268-
# - name: Publish to **PyPI** (Trusted Publishing)
269-
# uses: pypa/gh-action-pypi-publish@release/v1
270-
# with:
271-
# repository-url: https://upload.pypi.org/legacy/
272-
# packages-dir: upload
273-
# skip-existing: true

doc/source/development/maintaining.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,9 +445,9 @@ which will be triggered when the tag is pushed.
445445
- Set as the latest release: Leave checked, unless releasing a patch release for an older version
446446
(e.g. releasing 1.4.5 after 1.5 has been released)
447447

448-
5. Upload wheels to PyPI::
449-
450-
twine upload pandas/dist/pandas-<version>*.{whl,tar.gz} --skip-existing
448+
5. Wheels are uploaded automatically by GitHub Actions
449+
via **Trusted Publishing** when the GitHub *Release*
450+
is published. No manual ``twine upload`` step is required.
451451

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

0 commit comments

Comments
 (0)