Skip to content

Commit 409dcb4

Browse files
author
evgenii
committed
CI: restrict publish job to upstream repo and add skip-existing
1 parent da41c89 commit 409dcb4

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

.github/workflows/wheels.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,8 @@ jobs:
220220
set_upload_vars
221221
upload_wheels
222222
223-
################################################
224-
# Publish Wheels and Source Distribution to PyPI
225-
################################################
226223
publish:
227-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
224+
if: github.repository == 'pandas-dev/pandas' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
228225
needs:
229226
- build_sdist
230227
- build_wheels
@@ -238,13 +235,11 @@ jobs:
238235
contents: read
239236

240237
steps:
241-
# 1. Pull every artifact produced by the two upstream jobs
242238
- name: Download all artifacts
243239
uses: actions/download-artifact@v4
244240
with:
245241
path: dist # all files land in ./dist/**
246242

247-
# 2. Move wheels & sdist into a flat 'upload' dir (skip Pyodide wheels)
248243
- name: Collect files
249244
run: |
250245
mkdir -p upload
@@ -253,9 +248,9 @@ jobs:
253248
-name '*.whl' -exec mv {} upload/ \;
254249
find dist -name '*.tar.gz' -exec mv {} upload/ \;
255250
256-
# 3. Publish to PyPI using Trusted Publishing
257251
- name: Publish to PyPI (Trusted Publishing)
258252
uses: pypa/gh-action-pypi-publish@release/v1
259253
with:
260254
repository-url: https://upload.pypi.org/legacy/
261255
packages-dir: upload
256+
skip-existing: true

0 commit comments

Comments
 (0)