Skip to content

Commit b86fa9f

Browse files
committed
explicitly require approval to public prereleases
1 parent f50fa7b commit b86fa9f

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ inputs:
4545
required: true
4646
default: '10'
4747

48+
include_prereleases:
49+
description: 'If set to true prereleases (alpha, beta, rc) will also be built.'
50+
required: true
51+
default: "false"
52+
4853
update_python:
4954
description: 'When enabled python versions will also be updated.'
5055
required: true
@@ -60,6 +65,7 @@ runs:
6065
run: "bash ${{ github.action_path }}/scripts/update_packages.sh \"${{ inputs.package }}\" \"${{ inputs.action_path }}\""
6166
env:
6267
MAX_VERSIONS: ${{ inputs.max_versions }}
68+
INCLUDE_PRERELEASE: ${{ inputs:include_prereleases}}
6369

6470
- name: Update Python Versions
6571
shell: bash
@@ -82,6 +88,7 @@ runs:
8288
MAX_VERSIONS: ${{ inputs.max_versions }}
8389
ORGANIZATION: ${{ inputs.organization }}
8490
REPOSITORY: ${{ inputs.repository }}
91+
INCLUDE_PRERELEASE: ${{ inputs:include_prereleases}}
8592

8693
- name: "Push"
8794
shell: bash

scripts/latest_versions.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@ else
77
GREP=grep
88
fi
99

10-
curl -sL https://pypi.org/simple/$1/ | $GREP -oh '[[:digit:]]*\.[[:digit:]]*\.[[:digit:]].**[\.whl|\.tar\.gz]<' | cut -d"." -f 1,2,3 | cut -d"-" -f 1 | uniq | tail -${2:-10}
10+
if [[ "$INCLUDE_PRERELEASE" == "true" ]]; then
11+
curl -sL https://pypi.org/simple/$1/ | $GREP -oh '[[:digit:]]*\.[[:digit:]]*\.[[:digit:]].**[\.whl|\.tar\.gz]<' | cut -d"." -f 1,2,3 | cut -d"-" -f 1 | uniq | tail -${2:-10}
12+
else
13+
curl -sL https://pypi.org/simple/$1/ | $GREP -oh '[[:digit:]]*\.[[:digit:]]*\.[[:digit:]].**[\.whl|\.tar\.gz]<' | cut -d"." -f 1,2,3 | cut -d"-" -f 1 | cut -d"b" -f 1 | cut -d"a" -f 1 | uniq | tail -${2:-10}
14+
fi

0 commit comments

Comments
 (0)