Skip to content

Commit b4ec6aa

Browse files
author
Chris Mitchell
committed
[PETOSS-980] Persist venv on PATH so twine resolves in later steps
Each workflow run: block is a fresh shell, so the venv activated in Install dependencies didn't carry over to the Publish to PyPi step. Append the venv's bin dir to GITHUB_PATH so twine keeps resolving there without needing to escape the venv via sudo. Verified locally with act (catthehacker/ubuntu:act-latest, which has the same apt-installed python3-packaging 24.0 as the real runner): the old sudo pip install step fails the same way, the new step installs twine cleanly inside the venv, twine --version resolves correctly in a later step with no venv activation, and the apt packaging package is left untouched.
1 parent be9c76c commit b4ec6aa

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
source venv/bin/activate
3636
pip install --upgrade pip
3737
pip install twine
38+
echo "$PWD/venv/bin" >> "$GITHUB_PATH"
3839
working-directory: xero-python
3940

4041
- name: Fetch Latest release number

0 commit comments

Comments
 (0)