Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
dhuangnm authored and dhuangnm committed Sep 19, 2024
1 parent b16b39a commit b439b41
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions actions/get-pypi-latest-versions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ runs:
using: composite
steps:
- id: getpypi
run: |-
run: |
set -x
URL="https://pypi.org/project/${{ inputs.package_name }}/#history"
curl --header 'Accept: application/vnd.pypi.simple.v1+json' ${URL} > history.log
cat history.log
all=`cat history.log | grep 'release__card' | sed 's/.*project\///g' | cut -d'/' -f2`
latest="${{ inputs.num_of_latest }}"
latest=${{ inputs.num_of_latest }}
if [[ -z "${{ inputs.num_of_latest }}" ]]; then
latest=1
fi
echo "all=${all}"
versions=`echo "${all}" | head -${latest}`
echo "versions=${versions}" >> "$GITHUB_OUTPUT"
set +x
shell: bash

0 comments on commit b439b41

Please sign in to comment.