Skip to content

Commit dc78f6f

Browse files
author
Julius Busecke
authored
Check uploaded version for testpypi and pypi seperately (#110)
Check uploaded version for testpypi and pypi seperately
1 parent 9fea98e commit dc78f6f

1 file changed

Lines changed: 25 additions & 15 deletions

File tree

.github/workflows/pythonpublish.yaml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,6 @@ jobs:
7070
password: ${{ secrets.TESTPYPI_TOKEN }}
7171
repository_url: https://test.pypi.org/legacy/
7272
verbose: true
73-
# - name: Setup upterm session
74-
# uses: lhotari/action-upterm@v1
75-
- name: Check uploaded package
76-
run: |
77-
sleep 10
78-
python -m pip install --upgrade pip
79-
pip cache purge
80-
# This is kind of stupid, but the only way I got this to work with the latest versions on testpypi
81-
# If I used: python -m pip install --extra-index-url https://test.pypi.org/simple --upgrade xarrayutils
82-
# It would grab an older cmip6_pp version and with `--index-url=...` I cant get the proper dependencies from pypi
83-
# So I am installing the dependencies manually from pypi and the newest version from testpypi...not sure if this
84-
# defeats the purpose, but I am frankly fed up with this shit!
85-
python -m pip install xarray dask numpy scipy
86-
python -m pip install --index-url https://test.pypi.org/simple --upgrade xarrayutils
87-
python -c "import xarrayutils;print(xarrayutils.__version__)"
8873
upload-to-pypi:
8974
needs: test-built-dist
9075
if: "!github.event.release.prerelease"
@@ -100,3 +85,28 @@ jobs:
10085
user: __token__
10186
password: ${{ secrets.PYPI_TOKEN }}
10287
verbose: true
88+
check-version-testpypi:
89+
runs-on: ubuntu-latest
90+
steps:
91+
- name: Check uploaded testpypi package
92+
run: |
93+
sleep 10
94+
python -m pip install --upgrade pip
95+
pip cache purge
96+
# This is kind of stupid, but the only way I got this to work with the latest versions on testpypi
97+
# If I used: python -m pip install --extra-index-url https://test.pypi.org/simple --upgrade xarrayutils
98+
# It would grab an older cmip6_pp version and with `--index-url=...` I cant get the proper dependencies from pypi
99+
# So I am installing the dependencies manually from pypi and the newest version from testpypi...not sure if this
100+
# defeats the purpose, but I am frankly fed up with this shit!
101+
python -m pip install xarray dask numpy scipy
102+
python -m pip install --index-url https://test.pypi.org/simple --upgrade xarrayutils
103+
python -c "import xarrayutils;print(xarrayutils.__version__)"
104+
check-version-pypi:
105+
runs-on: ubuntu-latest
106+
steps:
107+
- name: Check uploaded pypi package
108+
run: |
109+
python -m pip install --upgrade pip
110+
python -m pip install --upgrade xarrayutils
111+
python -c "import xarrayutils;print(xarrayutils.__version__)"
112+

0 commit comments

Comments
 (0)