Skip to content

Commit

Permalink
chore: Fix broken pypi publish action
Browse files Browse the repository at this point in the history
According to [this GitHub issue][1], the `pypa/gh-action-pypi-publish`
action cannot be used in nested actions. This commit inlines the usage
of this action into the top-level workflows instead.

[1]: pypa/gh-action-pypi-publish#299
  • Loading branch information
keelerm84 committed Nov 19, 2024
1 parent dc70fcb commit 1ad3790
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
18 changes: 0 additions & 18 deletions .github/actions/publish/action.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:

- uses: ./.github/actions/build

- uses: ./.github/actions/publish
- name: Publish package distributions to PyPI
if: ${{ inputs.dry_run == false }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
token: ${{env.PYPI_AUTH_TOKEN}}
dry_run: ${{ inputs.dry_run }}
password: ${{env.PYPI_AUTH_TOKEN}}
6 changes: 3 additions & 3 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ jobs:
- uses: ./.github/actions/build-docs
if: ${{ steps.release.outputs.releases_created == 'true' }}

- uses: ./.github/actions/publish
- name: Publish package distributions to PyPI
if: ${{ steps.release.outputs.releases_created == 'true' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
token: ${{env.PYPI_AUTH_TOKEN}}
dry_run: false
password: ${{env.PYPI_AUTH_TOKEN}}

- uses: ./.github/actions/publish-docs
if: ${{ steps.release.outputs.releases_created == 'true' }}
Expand Down

0 comments on commit 1ad3790

Please sign in to comment.