Skip to content

Commit a0377f2

Browse files
committed
fix: verify published cli via temp install
1 parent 7a8d602 commit a0377f2

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,16 @@ jobs:
341341
--verbose
342342
343343
- name: Verify published CLI
344+
shell: bash
344345
run: |
345-
npm exec --yes --package okcodes@${{ needs.preflight.outputs.version }} -- okcode --version
346-
npm exec --yes --package okcodes@${{ needs.preflight.outputs.version }} -- okcode --help >/dev/null
346+
set -euo pipefail
347+
tmpdir="$(mktemp -d)"
348+
pushd "$tmpdir" >/dev/null
349+
npm init -y >/dev/null 2>&1
350+
npm install --no-save "okcodes@${{ needs.preflight.outputs.version }}" >/dev/null 2>&1
351+
./node_modules/.bin/okcode --version
352+
./node_modules/.bin/okcode --help >/dev/null
353+
popd >/dev/null
347354
348355
release:
349356
name: Publish GitHub Release

0 commit comments

Comments
 (0)