Dough Git

commit

CI: stamp desktop version without npm

commit
fafa7fd1a48b58c974df603d9774b826d95e39ea
author
Clove Twilight <[email protected]>
date
2026-08-31 11:56
`npm version` fails in apps/desktop — npm walks up to the Bun workspace root
and rejects the `workspace:*` deps ("Unsupported URL Type workspace:").
Rewrite the version field with a small node script instead; node is
preinstalled on every runner and never touches the dependency tree.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HsatRFz8FxXMiLp3D96bmp

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 5399fde..6cc4afc 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -81,11 +81,15 @@ jobs:
 
       # electron-updater compares the running app's version against the one in
       # the published latest*.yml, so the packaged build has to carry the tag's
-      # version (the checked-in package.json is only ever a floor).
+      # version (the checked-in package.json is only ever a floor). Edit the
+      # field directly — `npm version` chokes on this repo's `workspace:*`
+      # deps, and npm isn't the package manager here anyway.
       - name: stamp desktop version
         working-directory: apps/desktop
         shell: bash
-        run: npm version --no-git-tag-version --allow-same-version "${VERSION#v}"
+        run: |
+          node -e "const fs=require('fs');const p=JSON.parse(fs.readFileSync('package.json','utf8'));p.version=process.env.VERSION.replace(/^v/,'');fs.writeFileSync('package.json',JSON.stringify(p,null,2)+'\n')"
+          node -e "console.log('desktop version =>',require('./package.json').version)"
         env:
           VERSION: ${{ inputs.version || github.ref_name }}