From ad82fe972b50c2ece54189b1b428fbdc8c595d61 Mon Sep 17 00:00:00 2001 From: Simon Gerber Date: Mon, 13 Nov 2023 09:44:41 +0100 Subject: [PATCH] Increase connection timeout for publishing package to PyPI --- .github/workflows/publish-pypi.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 71f2113a..1a94d480 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -46,9 +46,16 @@ jobs: run: poetry build - name: Publish to PyPI if: startsWith(github.ref, 'refs/tags/v') + env: + # increase connection timeout to PyPI to 60s + # NOTE(sg): This is probably not required + POETRY_REQUESTS_TIMEOUT: "60" run: poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }} - name: Publish to TestPyPI if: "!startsWith(github.ref, 'refs/tags/v')" + env: + # increase connection timeout to TestPyPI to 60s + POETRY_REQUESTS_TIMEOUT: "60" run: | poetry config repositories.test-pypi https://test.pypi.org/legacy/ poetry publish -r test-pypi -u __token__ -p ${{ secrets.TEST_PYPI_TOKEN }}