Skip to content

Commit

Permalink
Merge pull request #181 from c-bata/hotfix-release-workflow
Browse files Browse the repository at this point in the history
Fix a GitHub action workflow for publishing to PyPI
  • Loading branch information
not522 authored Nov 12, 2024
2 parents 3477471 + 0378d30 commit b92c134
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,21 @@ jobs:
run: |
python -m build
- name: Verify the distributions
run: twine check dist/*

- name: Publish distribution to TestPyPI
# The following upload action cannot be executed in the forked repository.
if: (github.event_name == 'schedule') || (github.event_name == 'release')
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
# Temporary workaround to avoid the Twine's bug for attestations support.
# See https://github.com/pypa/gh-action-pypi-publish/issues/283
attestations: false

- name: Publish distribution to PyPI
# The following upload action cannot be executed in the forked repository.
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
# Temporary workaround to avoid the Twine's bug for attestations support.
# See https://github.com/pypa/gh-action-pypi-publish/issues/283
attestations: false

0 comments on commit b92c134

Please sign in to comment.