From c569f932162f30e64fa7f7e643bbe40a51e5801c Mon Sep 17 00:00:00 2001 From: "Gregory Markou (ai)" Date: Mon, 6 Jul 2026 15:58:57 +0200 Subject: [PATCH] fix(ci): switch release-please to the simple strategy The rust strategy requires the package root Cargo.toml to contain a [package] section and fails on our virtual workspace manifest ("is not a package manifest"). Use release-type simple with x-release-please- version annotations on the three crate versions and the rompatch-core dependency requirements, keeping a single release PR, tag, and changelog. Since the simple strategy cannot update Cargo.lock, the workflow now runs cargo update --workspace on the release branch and commits the result. Co-Authored-By: Claude --- .github/workflows/release-please.yml | 22 ++++++++++++++++++++++ crates/rompatch-core/Cargo.toml | 2 +- crates/rompatch-gui/Cargo.toml | 4 ++-- crates/rompatch/Cargo.toml | 4 ++-- release-please-config.json | 14 +++++++++++++- 5 files changed, 40 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 8c8b1b2..dd59cdc 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -21,6 +21,28 @@ jobs: config-file: release-please-config.json manifest-file: .release-please-manifest.json + # The simple release strategy bumps the crate Cargo.toml versions via + # annotated extra-files but cannot touch Cargo.lock, so refresh the + # lockfile on the release branch. release-please force-pushes that + # branch on every main push, and this run re-appends the fix each time. + - uses: actions/checkout@v4 + if: ${{ steps.rp.outputs.prs_created == 'true' }} + with: + ref: ${{ fromJSON(steps.rp.outputs.pr).headBranchName }} + - uses: dtolnay/rust-toolchain@stable + if: ${{ steps.rp.outputs.prs_created == 'true' }} + - name: Sync Cargo.lock on release branch + if: ${{ steps.rp.outputs.prs_created == 'true' }} + run: | + cargo update --workspace + if ! git diff --quiet -- Cargo.lock; then + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add Cargo.lock + git commit -m "chore: sync Cargo.lock with release version" + git push + fi + # When release-please cuts a release (its PR was merged), build and # attach the signed macOS artifacts + updater manifest. release-please # tags with the default GITHUB_TOKEN, which cannot trigger the tag-push diff --git a/crates/rompatch-core/Cargo.toml b/crates/rompatch-core/Cargo.toml index 7c3ede7..52a4d06 100644 --- a/crates/rompatch-core/Cargo.toml +++ b/crates/rompatch-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rompatch-core" -version = "0.3.1" +version = "0.3.1" # x-release-please-version edition.workspace = true license.workspace = true repository.workspace = true diff --git a/crates/rompatch-gui/Cargo.toml b/crates/rompatch-gui/Cargo.toml index 7f62155..de94e0a 100644 --- a/crates/rompatch-gui/Cargo.toml +++ b/crates/rompatch-gui/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rompatch-gui" -version = "0.3.1" +version = "0.3.1" # x-release-please-version edition.workspace = true license.workspace = true repository.workspace = true @@ -14,7 +14,7 @@ crate-type = ["rlib"] tauri-build = { version = "=2.6.1", features = [] } [dependencies] -rompatch-core = { version = "=0.3.1", path = "../rompatch-core", features = ["serde"] } +rompatch-core = { version = "=0.3.1", path = "../rompatch-core", features = ["serde"] } # x-release-please-version serde = { version = "=1.0.228", features = ["derive"] } serde_json = "=1.0.149" sha2 = "=0.10.9" diff --git a/crates/rompatch/Cargo.toml b/crates/rompatch/Cargo.toml index 356d42d..fceacd1 100644 --- a/crates/rompatch/Cargo.toml +++ b/crates/rompatch/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rompatch" -version = "0.3.1" +version = "0.3.1" # x-release-please-version edition.workspace = true license.workspace = true repository.workspace = true @@ -11,7 +11,7 @@ name = "rompatch" path = "src/main.rs" [dependencies] -rompatch-core = { path = "../rompatch-core", version = "0.3.1" } +rompatch-core = { path = "../rompatch-core", version = "0.3.1" } # x-release-please-version lexopt = "0.3" [lints] diff --git a/release-please-config.json b/release-please-config.json index 7f4ee2c..9e3c919 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1,12 +1,24 @@ { "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", - "release-type": "rust", + "release-type": "simple", "include-component-in-tag": false, "packages": { ".": { "component": "rompatch", "changelog-path": "CHANGELOG.md", "extra-files": [ + { + "type": "generic", + "path": "crates/rompatch-core/Cargo.toml" + }, + { + "type": "generic", + "path": "crates/rompatch/Cargo.toml" + }, + { + "type": "generic", + "path": "crates/rompatch-gui/Cargo.toml" + }, { "type": "json", "path": "crates/rompatch-gui/ui/package.json",