Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add working directory to CD pypi #143

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/cd-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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/*

Expand All @@ -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/*
Loading