Skip to content

Commit e387426

Browse files
TomWambsgansclaude
andcommitted
ci: release-please sets the bindings crates' versions in bindings/Cargo.lock
The lock was bumped only by sync-cargo-lock, pushing to the release PR's branch after release-please updated it; merging the PR first (#819) left main's lock at the previous version and Bindings CI's lock check red. release-please now edits the four workspace crates' lock entries in its own commit, as it does bindings/Cargo.toml. Its TOML parser wraps each value, so the filters compare @.name.value as well as @.name. Tested with release-please 17.3.0 (what release-please-action v4 bundles) and 17.11.2: from the 0.15.0 lock, the config's four entries change exactly the four version lines, giving the lock of 001c9dc byte for byte. sync-cargo-lock stays as a fallback until a release PR shows it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 001c9dc commit e387426

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

‎.github/workflows/bindings-release-please.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ jobs:
2727
config-file: release-please-config.json
2828
manifest-file: .release-please-manifest.json
2929

30-
# release-please cannot select entries in Cargo.lock, so bring the bindings workspace crates'
31-
# locked versions in line with the release PR's bindings/Cargo.toml.
30+
# release-please sets the bindings workspace crates' versions in bindings/Cargo.lock itself (its
31+
# parser wraps each value, hence `@.name.value` in its config): this is a fallback, which finds
32+
# the lock in sync.
3233
sync-cargo-lock:
3334
needs: release-please
3435
if: ${{ needs.release-please.outputs.pr_branch != '' }}

‎release-please-config.json‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,26 @@
4949
{
5050
"type": "generic",
5151
"path": "nim/lean_pq/abi.nim"
52+
},
53+
{
54+
"type": "toml",
55+
"path": "Cargo.lock",
56+
"jsonpath": "$.package[?(@.name==='lean-pq' || @.name.value==='lean-pq')].version"
57+
},
58+
{
59+
"type": "toml",
60+
"path": "Cargo.lock",
61+
"jsonpath": "$.package[?(@.name==='lean-pq-native' || @.name.value==='lean-pq-native')].version"
62+
},
63+
{
64+
"type": "toml",
65+
"path": "Cargo.lock",
66+
"jsonpath": "$.package[?(@.name==='lean-pq-node' || @.name.value==='lean-pq-node')].version"
67+
},
68+
{
69+
"type": "toml",
70+
"path": "Cargo.lock",
71+
"jsonpath": "$.package[?(@.name==='py-lean-pq' || @.name.value==='py-lean-pq')].version"
5272
}
5373
],
5474
"component": "bindings"

0 commit comments

Comments
 (0)