Skip to content

Commit 0369ef5

Browse files
authored
fix(release): keep the Python lockfile version consistent (#12)
1 parent 386bd06 commit 0369ef5

4 files changed

Lines changed: 24 additions & 4 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
with:
2929
version: '0.10.2'
3030

31+
- name: Check lockfile before installing dependencies
32+
run: uv lock --check
33+
3134
- name: Install dependencies
3235
run: uv sync --all-extras --group docs
3336

‎CONTRIBUTING.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,18 @@ $ ./scripts/format
150150

151151
## Publishing and releases
152152

153+
The checked-in `uv.lock` must match `pyproject.toml` before dependency installation.
154+
CI checks this with its pinned uv version (0.10.2). Refresh with that version of
155+
`uv lock`, without upgrading dependencies, when changing package metadata.
156+
157+
Release Please updates the editable root package in `uv.lock` through its TOML
158+
extra-file updater. The name filter uses `name.value` because the pinned
159+
Release Please 17.3.0 parser represents TOML strings as tagged values. When upgrading
160+
the release action, verify a simulated version bump changes only the root package's
161+
version and that `uv lock --check` still succeeds; never target a positional package
162+
index or apply a version replacement to all dependencies.
163+
164+
153165
Changes made to this repository via the automated release PR pipeline should publish to PyPI automatically. If
154166
the changes aren't made through the automated pipeline, you may want to make releases manually.
155167

‎release-please-config.json‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@
6161
],
6262
"release-type": "python",
6363
"extra-files": [
64-
"src/runloop_api_client/_version.py"
64+
"src/runloop_api_client/_version.py",
65+
{
66+
"type": "toml",
67+
"path": "uv.lock",
68+
"jsonpath": "$.package[?(@.name.value == \"runloop-api-client\")].version"
69+
}
6570
]
66-
}
71+
}

‎uv.lock‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)