Skip to content

Commit

Permalink
Add more time to get latest version from index (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbusecke authored Jun 23, 2021
1 parent dc78f6f commit 3f5b2f9
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions .github/workflows/pythonpublish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:

test-built-dist:
needs: build-artifacts
if: github.event.release.prerelease
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
Expand All @@ -63,15 +62,23 @@ jobs:
run: |
ls -ltrh
ls -ltrh dist
upload-to-testpypi:
needs: test-built-dist
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: releases
path: dist
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@v1.4.2
repository_url: https://test.pypi.org/legacy/
with:
user: __token__
password: ${{ secrets.TESTPYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
verbose: true
upload-to-pypi:
needs: test-built-dist
needs: upload-to-testpypi
if: "!github.event.release.prerelease"
runs-on: ubuntu-latest
steps:
Expand All @@ -86,11 +93,12 @@ jobs:
password: ${{ secrets.PYPI_TOKEN }}
verbose: true
check-version-testpypi:
needs: upload-to-testpypi
runs-on: ubuntu-latest
steps:
- name: Check uploaded testpypi package
run: |
sleep 10
sleep 30
python -m pip install --upgrade pip
pip cache purge
# This is kind of stupid, but the only way I got this to work with the latest versions on testpypi
Expand All @@ -102,11 +110,15 @@ jobs:
python -m pip install --index-url https://test.pypi.org/simple --upgrade xarrayutils
python -c "import xarrayutils;print(xarrayutils.__version__)"
check-version-pypi:
runs-on: ubuntu-latest
steps:
- name: Check uploaded pypi package
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade xarrayutils
python -c "import xarrayutils;print(xarrayutils.__version__)"
needs: upload-to-pypi
runs-on: ubuntu-latest
steps:
- name: Check uploaded pypi package
run: |
sleep 30
python -m pip install --upgrade pip
pip cache purge
python -m pip install xarray dask numpy scipy #I thought this should happen automatically? I must still be packaging something wrong...
python -m pip install --upgrade xarrayutils
python -c "import xarrayutils;print(xarrayutils.__version__)"

0 comments on commit 3f5b2f9

Please sign in to comment.