File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 33# This script is copied directly from https://github.com/MathieuMoalic/action-python-package-new-version/blob/main/entrypoint.sh
44# This is just until there is extra functionality as part of that repo to allow specifying a different index.
55
6+ # ######### helper ##########
7+ error_exit () {
8+ echo " Error: $1 " >&2
9+ exit 1
10+ }
11+
612# Check if pyproject.toml exists
713PYPROJECT_FILE=pyproject.toml
814
@@ -26,7 +32,10 @@ echo "PACKAGE_NAME is $PACKAGE_NAME"
2632
2733# Step 3: Get latest release version from PyPI
2834INDEX=" ${PYPI_INDEX:- pypi.org} "
29- PUBLISHED_VERSIONS=$( curl -s " https://$INDEX /pypi/$PACKAGE_NAME /json" | jq -r ' .releases | keys | .[]' )
35+ echo " Index is $INDEX "
36+ echo " https://${INDEX} /pypi/${PACKAGE_NAME} /json"
37+ curl -s " https://${INDEX} /pypi/${PACKAGE_NAME} /json"
38+ PUBLISHED_VERSIONS=$( curl -s " https://${INDEX} /pypi/${PACKAGE_NAME} /json" | jq -r ' .releases | keys | .[]' )
3039
3140if [ -z " $PUBLISHED_VERSIONS " ]; then
3241 error_exit " Unable to retrieve published version from $INDEX for $PACKAGE_NAME "
Original file line number Diff line number Diff line change 5757 - uses : actions/checkout@v4
5858 with :
5959 fetch-depth : 0
60- - name : Check whether to release on indexes
61- uses : MathieuMoalic/action-python-package-new-version@c4e361a9d28c1bcc19fe10bb4dcb751b625f031b
60+ - name : Check whether to release on pypi.org
61+ run : |
62+ ./.github/scripts/version_check.sh
63+ - name : Check whether to release on test.pypi.org
64+ run : |
65+ export PYPI_INDEX=test.pypi.org
66+ ./.github/scripts/version_check.sh
6267 - name : Globalise determined version
6368 id : set_version
6469 run : echo "package_version=${{ env.PACKAGE_VERSION }}" >> "$GITHUB_OUTPUT"
You can’t perform that action at this time.
0 commit comments