Skip to content

Commit

Permalink
Add random sleep to PyPI push to avoid 503
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknight committed Aug 2, 2024
1 parent 1ad5b3a commit f6ca251
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build-and-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@ jobs:
name: ${{ matrix.distribution}}
path: dist/

- name: Random sleep to avoid PyPI 503
run: |
RANDOM_SLEEP=$(( RANDOM % 30 + 1 ))
sleep $RANDOM_SLEEP
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down Expand Up @@ -422,6 +427,11 @@ jobs:
with:
name: ${{ matrix.distribution }}
path: dist/

- name: Random sleep to avoid PyPI 503
run: |
RANDOM_SLEEP=$(( RANDOM % 30 + 1 ))
sleep $RANDOM_SLEEP
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit f6ca251

Please sign in to comment.