From a63a871f41e676b6eb3565bd7133235a1471ed83 Mon Sep 17 00:00:00 2001 From: Dijo S Benelen Date: Sun, 8 Nov 2026 22:27:42 +0530 Subject: [PATCH] fix(ci): check vaultx --version against the cached binary The launcher's first run downloads the binary and prints an "installed at" line to stdout, so an exact match on that run fails even though the install is good. Run once to fetch and verify, assert the cached binary exists, then assert the exact version output. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/publish-github-packages.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-github-packages.yml b/.github/workflows/publish-github-packages.yml index d5b874a..3bee1f8 100644 --- a/.github/workflows/publish-github-packages.yml +++ b/.github/workflows/publish-github-packages.yml @@ -107,12 +107,17 @@ jobs: diff -r "$RUNNER_TEMP/src/package" "$RUNNER_TEMP/readback/package" # --ignore-scripts skips postinstall, so the launcher's on-demand - # path downloads the release binary and verifies its SHA-256. + # path downloads the release binary and verifies its SHA-256. That + # first run also prints an "installed at" line to stdout, so the + # exact version check runs against the cached binary afterwards. npm install --prefix "$RUNNER_TEMP/consumer" \ --ignore-scripts --no-audit --no-fund --package-lock=false --engine-strict \ --registry="$REGISTRY" "$GPR_NAME@$VERSION" - out="$(VAULTX_CACHE_DIR="$RUNNER_TEMP/vaultx-cache" \ - "$RUNNER_TEMP/consumer/node_modules/.bin/vaultx" --version)" + export VAULTX_CACHE_DIR="$RUNNER_TEMP/vaultx-cache" + vaultx="$RUNNER_TEMP/consumer/node_modules/.bin/vaultx" + "$vaultx" --version + test -x "$VAULTX_CACHE_DIR/vaultx-$VERSION" + out="$("$vaultx" --version)" echo "$out" test "$out" = "vaultx $VERSION"