Skip to content

Commit 0199c76

Browse files
committed
[ci] Fix publishing of release to PyPI and Test PyPI
1 parent e4a0d3f commit 0199c76

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,15 @@ jobs:
4343
twine check dist/*
4444
env:
4545
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ env.version }}
46+
- name: Publish packages to PyPI
47+
if: github.event_name == 'release'
48+
uses: pypa/gh-action-pypi-publish@release/v1
4649
- name: Publish packages to Test PyPI
4750
if: ${{ github.event_name == 'release' || (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/pypi')) }}
4851
uses: pypa/gh-action-pypi-publish@release/v1
4952
with:
5053
repository-url: https://test.pypi.org/legacy/
54+
# https://github.com/pypa/gh-action-pypi-publish?tab=readme-ov-file#generating-and-uploading-attestations
55+
# See also issue https://github.com/pypa/gh-action-pypi-publish/issues/283 when using gh-action-pypi-publish twice.
56+
attestations: false
5157
skip-existing: true
52-
- name: Publish packages to PyPI
53-
if: github.event_name == 'release'
54-
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)