From 42a18794e1857abc40f30cc779c5d27b2fd82246 Mon Sep 17 00:00:00 2001 From: konsti-openai Date: Mon, 2 Nov 2026 15:11:29 +0000 Subject: [PATCH] Pin PyPI README chart URLs to the packaged commit --- .github/prepare-pypi-readme.sh | 7 +++++++ .github/workflows/ci.yml | 1 + 2 files changed, 8 insertions(+) create mode 100644 .github/prepare-pypi-readme.sh diff --git a/.github/prepare-pypi-readme.sh b/.github/prepare-pypi-readme.sh new file mode 100644 index 0000000..7866f3e --- /dev/null +++ b/.github/prepare-pypi-readme.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -euo pipefail + +# GitHub resolves relative chart paths. PyPI needs the raw images at the +# packaged commit, even before the release workflow creates the version tag. +raw_url="https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA" +sed -Ei "s@(src|srcset)=\"benchmarks/@\1=\"$raw_url/benchmarks/@g" README.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebfdbf3..767d267 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,7 @@ jobs: UV_REQUIRE_HASHES: 'true' run: | dist="$RUNNER_TEMP/dist" + bash .github/prepare-pypi-readme.sh uv build --sdist --no-sources --out-dir "$dist" --python 3.14 uv build "$dist"/*.tar.gz --wheel --no-sources --out-dir "$dist" --python 3.14 \ --config-setting 'build-args=--compatibility pypi --auditwheel check --features abi3'