You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stamp the release tag version into Cargo.toml before desktop, CLI, and Docker release builds
sync crates/openfang-desktop/tauri.conf.json to the same tag version for desktop releases
Problem
The v0.5.5 release artifacts can report stale versions because the repo metadata checked out by the release workflow still declares older values:
workspace Cargo version stayed at 0.5.1
desktop Tauri config stayed at 0.1.0
That lets packaged binaries drift from the actual release tag.
Fix
For tag-triggered release jobs, derive the version from github.ref_name, strip the leading v, and stamp it into the workspace Cargo metadata before building.
For the desktop release job, also update the Tauri config version before packaging.
Validation
replayed the stamping logic locally against v0.5.5
confirmed it rewrites both the Cargo workspace version and desktop Tauri version to 0.5.5
Reviewed. Good intent but the ~20-line Node.js inline script is copy-pasted 3 times across 3 jobs. Extract into a shared script file. Also the Cargo.toml regex is fragile and there is no Cargo.lock regeneration after modifying Cargo.toml.
Thanks - fixed the duplication by extracting the version stamping logic into scripts/stamp-release-version.mjs and updated all three jobs to call the shared script.
I also tightened the Cargo.toml update so it only rewrites the version line inside [workspace.package] instead of relying on the previous cross-section regex.
On Cargo.lock: this repo is a workspace root without a [package] section, so there is no root package version to regenerate there from this change. The release workflow only needs the workspace package version and desktop Tauri version stamped before build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cargo.tomlbefore desktop, CLI, and Docker release buildscrates/openfang-desktop/tauri.conf.jsonto the same tag version for desktop releasesProblem
The
v0.5.5release artifacts can report stale versions because the repo metadata checked out by the release workflow still declares older values:0.5.10.1.0That lets packaged binaries drift from the actual release tag.
Fix
For tag-triggered release jobs, derive the version from
github.ref_name, strip the leadingv, and stamp it into the workspace Cargo metadata before building.For the desktop release job, also update the Tauri config version before packaging.
Validation
v0.5.50.5.5Closes #884