fix(ci): fix dev-publish version stamp and platform sync (#1145)

Two bugs in the Dev Publish job:

1. node -p with escaped double-quotes broke on Node 22's eval mode
   (SyntaxError: Invalid or unexpected token). Switched to node -e
   with process.stdout.write and unescaped inner quotes.

2. version-stamp updated root package.json but not platform packages.
   When npm publish triggered prepublishOnly, sync-platform-versions
   dirtied 5 platform package.json files and git diff --exit-code
   failed. Added sync-platform-versions to the stamp step so
   prepublishOnly finds everything already in sync.

Fixes: https://github.com/gsd-build/gsd-2/actions/runs/23233857718
This commit is contained in:
Tom Boucher 2026-03-18 10:32:03 -04:00 committed by GitHub
parent 556443b6e3
commit ea42db9a1f

View file

@ -43,11 +43,12 @@ jobs:
- name: Build
run: npm run build
- name: Stamp dev version
- name: Stamp dev version and sync platform packages
id: stamp
run: |
npm run pipeline:version-stamp
echo "version=$(node -p 'require(\"./package.json\").version')" >> "$GITHUB_OUTPUT"
npm run sync-platform-versions
echo "version=$(node -e 'process.stdout.write(require("./package.json").version)')" >> "$GITHUB_OUTPUT"
- name: Publish @dev
run: npm publish --tag dev