@@ -961,30 +961,27 @@ jobs:
961961 run : |
962962 python -m pip install --upgrade pip
963963 python -m pip install poetry poetry-lock-package twine
964- poetry self add "poetry-dynamic-versioning[plugin]"
965- poetry install -E service --with dev,tests,docs
964+ poetry --no-ansi self add "poetry-dynamic-versioning[plugin]"
965+ poetry --no-ansi install -E service --with dev,tests,docs
966966 git config --global --add user.name "Renku Bot"
967967 git config --global --add user.email "[email protected] " 968- - name : Get version
969- id : get -version
968+ - name : Calculate pre-release version
969+ id : pre-release -version
970970 run : |
971- export VERSION=$(renku --version)
972- if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
973- echo "renku_version=${VERSION}rc1" >> $GITHUB_OUTPUT
974- else
975- echo "RENKU_VERSION=${VERSION}" >> $GITHUB_OUTPUT
976- fi
971+ renku_version=$(renku --version)
972+ rc=$(curl -s https://pypi.org/pypi/renku/json | jq ".releases|keys_unsorted | map(select( . | startswith(\"$renku_version\"))) | map(match(\"[0-9]+\\\\.[0-9]+\\\\.[0-9]+(rc([0-9]+))?\").captures[1].string // 0) | max | tonumber + 1")
973+ echo "RELEASE_VERSION=${renku_version}rc${rc}" >> "$GITHUB_OUTPUT"
977974 - name : Build and publish to pypi
978975 env :
979976 POETRY_VIRTUALENVS_CREATE : false
980977 PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
981- POETRY_DYNAMIC_VERSIONING_BYPASS : ${{ steps.get- version.outputs.RENKU_VERSION }}
978+ POETRY_DYNAMIC_VERSIONING_BYPASS : ${{ steps.pre-release- version.outputs.RELEASE_VERSION }}
982979 run : make publish-package
983980 - name : Build and publish lock package
984981 env :
985982 POETRY_VIRTUALENVS_CREATE : false
986983 PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
987- POETRY_DYNAMIC_VERSIONING_BYPASS : ${{ steps.get- version.outputs.RENKU_VERSION }}
984+ POETRY_DYNAMIC_VERSIONING_BYPASS : ${{ steps.pre-release- version.outputs.RELEASE_VERSION }}
988985 run : make publish-lock-package
989986
990987 update-develop-branch :
0 commit comments