Skip to content

Commit

Permalink
fix(release): set PYTHON_PATH in semantic_release; hard-code fallback (
Browse files Browse the repository at this point in the history
…#836)

* Update release-and-publish.yml: set PYTHON_PATH in semantic_release

* Update pyproject.toml: hard code python path fallback
  • Loading branch information
abrichr authored Jul 6, 2024
1 parent 0f5166e commit e6c88d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/release-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ jobs:
- name: Python Semantic Release
id: semantic_release
uses: python-semantic-release/[email protected]
env:
PYTHON_PATH: ${{ env.PYTHON_PATH }}
with:
github_token: ${{ secrets.ADMIN_TOKEN }} # Use the new token for authentication
git_committer_name: "OpenAdapt Bot"
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,13 @@ pip install poetry && \
echo "PYTHON_PATH is set to: $PYTHON_PATH" && \
if [ -z \"$PYTHON_PATH\" ]; then \
echo "PYTHON_PATH is empty, using default python3.10" && \
poetry env use python3.10; \
POETRY_PYTHON_PATH=$(which python3.10 || dirname $(ls /opt/hostedtoolcache/Python/3.10*/x64/bin/python3.10 | tail -n 1)/python3.10) && \
echo "Resolved Python path: $POETRY_PYTHON_PATH" && \
poetry env use $POETRY_PYTHON_PATH; \
else \
echo "Using python from PYTHON_PATH: $PYTHON_PATH/python3.10" && \
poetry env use $PYTHON_PATH/python3.10; \
fi && \
poetry build
"""

0 comments on commit e6c88d1

Please sign in to comment.