From 532b1410e6c310231555d170d58b26420e55ea0e Mon Sep 17 00:00:00 2001 From: Nolan Nichols Date: Tue, 4 Aug 2026 15:59:24 -0700 Subject: [PATCH] Bump to 0.3.0 and guard release tag/version drift The v0.3.0 release built 0.2.0 artifacts because pyproject.toml was never bumped, so PyPI rejected the upload with "400 File already exists". Bump the version, and fail the build job up front when a release tag doesn't match the packaged version instead of letting it surface as an opaque error at upload time. --- .github/workflows/publish.yml | 13 +++++++++++++ pyproject.toml | 2 +- uv.lock | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f291a86..25510ba 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,6 +22,19 @@ jobs: with: enable-cache: true + # A release tag whose version was never bumped in pyproject.toml only + # surfaces at upload time, as an opaque PyPI "400 File already exists". + # Fail here instead, before the tests even run. + - name: Check the release tag matches the package version + if: github.event_name == 'release' + run: | + tag="${GITHUB_REF_NAME#v}" + packaged="$(uv version --short)" + if [ "$tag" != "$packaged" ]; then + echo "::error::Release tag v$tag does not match pyproject.toml version $packaged — bump the version, merge, then re-tag." + exit 1 + fi + - name: Test (gate the release) run: uv run --group dev pytest -q diff --git a/pyproject.toml b/pyproject.toml index 12d35bf..b6e7f3c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "lokf" -version = "0.2.0" +version = "0.3.0" description = "Linked Open Knowledge Format (LOKF) — a semantic profile of Google's Open Knowledge Format, defined once in LinkML" readme = "README.md" license = "CC-BY-4.0" diff --git a/uv.lock b/uv.lock index c049c52..3d85c8e 100644 --- a/uv.lock +++ b/uv.lock @@ -833,7 +833,7 @@ wheels = [ [[package]] name = "lokf" -version = "0.2.0" +version = "0.3.0" source = { editable = "." } dependencies = [ { name = "linkml-runtime" },