Skip to content

Commit d878a72

Browse files
authored
fix pypi publishing (#1312)
### Changelog None ### Docs None ### Description See also foxglove/foxglove-sdk#158. > Running a publish to TestPyPI immediately followed by a publish to the "real" PyPI triggered an error due to a file already existing. The workaround recommended in pypa/gh-action-pypi-publish#283 (comment) is to set `attestations: false` on the TestPyPI publish.
1 parent 6c9ce28 commit d878a72

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

.github/workflows/ci.yml

+20-16
Original file line numberDiff line numberDiff line change
@@ -315,65 +315,69 @@ jobs:
315315
uses: pypa/gh-action-pypi-publish@release/v1
316316
if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
317317
with:
318-
packages_dir: python/mcap/dist
319-
repository_url: https://test.pypi.org/legacy/
320-
skip_existing: true
318+
packages-dir: python/mcap/dist
319+
repository-url: https://test.pypi.org/legacy/
320+
skip-existing: true
321+
attestations: false # https://github.com/pypa/gh-action-pypi-publish/issues/283#issuecomment-2499296440
321322

322323
- name: Publish mcap-protobuf-support to TestPyPI
323324
uses: pypa/gh-action-pypi-publish@release/v1
324325
if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
325326
with:
326-
repository_url: https://test.pypi.org/legacy/
327-
skip_existing: true
328-
packages_dir: python/mcap-protobuf-support/dist
327+
repository-url: https://test.pypi.org/legacy/
328+
skip-existing: true
329+
packages-dir: python/mcap-protobuf-support/dist
330+
attestations: false # https://github.com/pypa/gh-action-pypi-publish/issues/283#issuecomment-2499296440
329331

330332
- name: Publish mcap-ros1-support to TestPyPI
331333
uses: pypa/gh-action-pypi-publish@release/v1
332334
if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
333335
with:
334-
repository_url: https://test.pypi.org/legacy/
335-
skip_existing: true
336-
packages_dir: python/mcap-ros1-support/dist
336+
repository-url: https://test.pypi.org/legacy/
337+
skip-existing: true
338+
packages-dir: python/mcap-ros1-support/dist
339+
attestations: false # https://github.com/pypa/gh-action-pypi-publish/issues/283#issuecomment-2499296440
337340

338341
- name: Publish mcap-ros2-support to TestPyPI
339342
uses: pypa/gh-action-pypi-publish@release/v1
340343
if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
341344
with:
342-
repository_url: https://test.pypi.org/legacy/
343-
skip_existing: true
344-
packages_dir: python/mcap-ros2-support/dist
345+
repository-url: https://test.pypi.org/legacy/
346+
skip-existing: true
347+
packages-dir: python/mcap-ros2-support/dist
348+
attestations: false # https://github.com/pypa/gh-action-pypi-publish/issues/283#issuecomment-2499296440
345349

346350
- name: Publish mcap to PyPI
347351
if: |
348352
!github.event.pull_request.head.repo.fork &&
349353
startsWith(github.ref, 'refs/tags/releases/python/mcap/v')
350354
uses: pypa/gh-action-pypi-publish@release/v1
351355
with:
352-
packages_dir: python/mcap/dist
356+
packages-dir: python/mcap/dist
353357

354358
- name: Publish mcap-protobuf-support to PyPI
355359
if: |
356360
!github.event.pull_request.head.repo.fork &&
357361
startsWith(github.ref, 'refs/tags/releases/python/mcap-protobuf-support/v')
358362
uses: pypa/gh-action-pypi-publish@release/v1
359363
with:
360-
packages_dir: python/mcap-protobuf-support/dist
364+
packages-dir: python/mcap-protobuf-support/dist
361365

362366
- name: Publish mcap-ros1-support to PyPI
363367
if: |
364368
!github.event.pull_request.head.repo.fork &&
365369
startsWith(github.ref, 'refs/tags/releases/python/mcap-ros1-support/v')
366370
uses: pypa/gh-action-pypi-publish@release/v1
367371
with:
368-
packages_dir: python/mcap-ros1-support/dist
372+
packages-dir: python/mcap-ros1-support/dist
369373

370374
- name: Publish mcap-ros2-support to PyPI
371375
if: |
372376
!github.event.pull_request.head.repo.fork &&
373377
startsWith(github.ref, 'refs/tags/releases/python/mcap-ros2-support/v')
374378
uses: pypa/gh-action-pypi-publish@release/v1
375379
with:
376-
packages_dir: python/mcap-ros2-support/dist
380+
packages-dir: python/mcap-ros2-support/dist
377381

378382
go:
379383
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)