Skip to content

Commit 2292330

Browse files
adamtheturtleclaude
andcommitted
Replace pip index versions with PyPI API check in release workflow
The pip index versions command fails consistently on Linux runners, likely due to PEP 668 externally-managed Python on Ubuntu 24.04. Use the PyPI JSON API via curl instead, which is more reliable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6d4b53a commit 2292330

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ jobs:
222222
max_attempts: 50
223223
command: |
224224
normalized_version=$(echo "${{ needs.build.outputs.new_tag }}" | sed -E 's/\.0+([0-9])/.\1/g')
225-
pip index versions vws-cli | grep -wq "$normalized_version"
225+
curl -sf "https://pypi.org/pypi/vws-cli/${normalized_version}/json" > /dev/null
226226
227227
- name: Create requirements file
228228
run: echo "vws-cli==${{ needs.build.outputs.new_tag }}" > requirements.txt
@@ -321,7 +321,7 @@ jobs:
321321
shell: bash
322322
command: |
323323
normalized_version=$(echo "${{ needs.build.outputs.new_tag }}" | sed -E 's/\.0+([0-9])/.\1/g')
324-
pip index versions vws-cli | grep -wq "$normalized_version"
324+
curl -sf "https://pypi.org/pypi/vws-cli/${normalized_version}/json" > /dev/null
325325
326326
- name: Create requirements file
327327
run: echo "vws-cli==${{ needs.build.outputs.new_tag }}" > requirements.txt
@@ -381,7 +381,7 @@ jobs:
381381
max_attempts: 50
382382
command: |
383383
normalized_version=$(echo "${{ needs.build.outputs.new_tag }}" | sed -E 's/\.0+([0-9])/.\1/g')
384-
pip index versions vws-cli | grep -wq "$normalized_version"
384+
curl -sf "https://pypi.org/pypi/vws-cli/${normalized_version}/json" > /dev/null
385385
386386
- name: Create requirements file
387387
run: echo "vws-cli==${{ needs.build.outputs.new_tag }}" > requirements.txt

0 commit comments

Comments
 (0)