diff --git a/.github/workflows/cd-pypi.yml b/.github/workflows/cd-pypi.yml index 1126edc..a79fb8c 100644 --- a/.github/workflows/cd-pypi.yml +++ b/.github/workflows/cd-pypi.yml @@ -10,6 +10,12 @@ on: type: boolean required: false default: false + work-directory: + description: Working directory to build Python package (for monorepos). + Defaults to root directory. + type: string + required: false + default: "./" jobs: deploy: @@ -65,6 +71,7 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} run: | + cd ${{ inputs.working-directory }} python -m build twine upload dist/* @@ -74,5 +81,6 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_TEST_API_TOKEN }} run: | + cd ${{ inputs.working-directory }} python -m build twine upload --repository testpypi dist/*