We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9da498 commit 2013a0dCopy full SHA for 2013a0d
1 file changed
.github/workflows/ci.yml
@@ -51,9 +51,10 @@ jobs:
51
if [[ -n "${{ inputs.python-version }}" ]]; then
52
echo "python-version=$(jq 'split(",")' -Rc <(echo '${{ inputs.python-version }}'))" >> $GITHUB_OUTPUT
53
else
54
- min_ver=$(sed -rn '/^requires-python\s*=/ s/^.*=\s*">=([0-9](\.[0-9])*)(.*)/\1/p' pyproject.toml)
55
- if [[ -n ${min_ver} ]]; then
56
- echo "python-version=['${min_ver}', '3.x']" >> $GITHUB_OUTPUT
+ # pull supported python versions from classifiers
+ readarray -t vers < <(sed -rn '/Programming Language :: Python :: / s/.*([0-9]\.[0-9]+).*/\1/p' pyproject.toml)
+ if [[ ${#vers[@]} -ge 2 ]]; then
57
+ echo "python-version=['${vers[0]}', '${vers[-1]}']" >> $GITHUB_OUTPUT
58
59
exit 1
60
fi
0 commit comments