diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 6f480f8a..12adcf9b 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -50,6 +50,15 @@ jobs: # A publishing workflow must not restore a cache another job could have poisoned. enable-cache: false + - name: The publish target is one this workflow knows + # A caller's typo would otherwise skip both publish jobs and upload nothing. + if: inputs.target != '' && inputs.target != 'pypi' && inputs.target != 'testpypi' + env: + TARGET: ${{ inputs.target }} + run: | + echo "::error::unknown target '$TARGET': expected pypi or testpypi" + exit 1 + - name: Build the sdist and wheel run: uv build