Skip to content

Commit

Permalink
fix: replace pip search with curl+jq to fetch the current package ver…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
danielgrittner committed Aug 20, 2024
1 parent f1e80a1 commit cfe08e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
id: get_pypi_version
run: |
package_name=$(grep '^name = ' pyproject.toml | sed -E 's/name = "(.*)"/\1/')
latest_version=$(python -m pip install -U pip && pip search "$package_name" | grep -Eo "$package_name \([0-9]*\.[0-9]*\.[0-9]*\)")
latest_version=$(curl -s https://pypi.org/pypi/$package_name/json | jq -r '.info.version')
echo "Latest version on PyPI: $latest_version"
echo "::set-output name=LATEST_VERSION::$latest_version"
Expand Down

0 comments on commit cfe08e1

Please sign in to comment.