Skip to content

Commit

Permalink
chore: Fix broken pypi publish action (#22)
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 authored Nov 22, 2024
1 parent bc2e08c commit 1c61fbc
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 @@ -35,10 +35,11 @@ jobs:
- uses: ./.github/actions/build
id: 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}}

release-provenance:
needs: [ 'build-publish' ]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,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}}

release-provenance:
needs: [ 'release-package' ]
Expand Down

0 comments on commit 1c61fbc

Please sign in to comment.