🐛 Avoid broken env vars passed by GHA from host

Fixes https://github.com/pypa/gh-action-pypi-publish/issues/112.
This commit is contained in:
Sviatoslav Sydorenko 2022-12-06 21:40:38 +01:00
parent dfae161eab
commit 1350b8bd72
No known key found for this signature in database
GPG Key ID: 9345E8FEA89CA455
1 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,13 @@
set -Eeuo pipefail
# NOTE: These variables are needed to combat GitHub passing broken env vars
# NOTE: from the runner VM host runtime.
# Ref: https://github.com/pypa/gh-action-pypi-publish/issues/112
export PATH="$(python -m site --user-base)/bin:${PATH}"
export PYTHONPATH="$(python -m site --user-site):${PYTHONPATH}"
if [[
"$INPUT_USER" == "__token__" &&
! "$INPUT_PASSWORD" =~ ^pypi-