-
Notifications
You must be signed in to change notification settings - Fork 0
/
python-3.12.yaml
47 lines (44 loc) · 1.64 KB
/
python-3.12.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
python-3.12-check:
image: registry.gitlab.com/uniget-org/images/ubuntu:rolling
variables:
# renovate: datasource=github-releases depName=indygreg/python-build-standalone versioning=loose
INDYGREG_PYTHON_BUILD_STANDALONE_VERSION: 20241016
script:
- |
# Find cpython-${PYTHON_VERSION}+${version}-${arch}-unknown-linux-musl-install_only.tar.gz
VERSION="$(
curl --silent --show-error --location --fail \
--url "https://api.github.com/repos/indygreg/python-build-standalone/releases/tags/${INDYGREG_PYTHON_BUILD_STANDALONE_VERSION}" \
| jq --raw-output '.assets[].name' \
| grep -E -- '-x86_64-unknown-linux-musl-install_only.tar.gz$' \
| sed -E 's/^cpython-([^+]+)\+.+$/\1/' \
| grep -P '^3\.12\.\d+$' \
| sort -Vr \
| head -n 1
)"
if test -z "${VERSION}"; then
echo "Failed to fetch latest tag and extract version from GitHub"
exit 1
fi
echo "Got version <${VERSION}>"
echo "version=${VERSION}.${INDYGREG_PYTHON_BUILD_STANDALONE_VERSION}" >>variables.env
artifacts:
reports:
dotenv: variables.env
python-3.12-release:
needs:
- python-3.12-check
image: registry.gitlab.com/gitlab-org/release-cli:v0.19.0
script:
- |
echo "### Releasing python-3.12 v${VERSION}"
if release-cli get --tag-name python-3.12/${VERSION}; then
echo " Already exists"
exit 0
else
release-cli create \
--name "python-3.12 v${VERSION}" \
--description "Custom release of python-3.12 v${VERSION}" \
--tag-name "python-3.12/${VERSION}" \
--ref "${CI_COMMIT_SHA}"
fi