From e654cde79dcb74cc7ff3eca100fa5fc12932b297 Mon Sep 17 00:00:00 2001 From: YG Park Date: Wed, 5 Aug 2026 14:24:19 +0900 Subject: [PATCH] fix: verify npm install with CI unset --- .github/workflows/release.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9eb4fed..d795593 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -206,17 +206,18 @@ jobs: - name: Verify npm installation shell: bash run: | - mkdir -p "$RUNNER_TEMP/npm" - printf '%s\n' '{"private":true,"allowScripts":{"@circlesac/gh2":true}}' > "$RUNNER_TEMP/npm/package.json" - for attempt in {1..10}; do - if npm install --prefix "$RUNNER_TEMP/npm" "@circlesac/gh2@$VERSION"; then - break + for attempt in {1..20}; do + prefix="$RUNNER_TEMP/npm-$attempt" + mkdir -p "$prefix" + printf '%s\n' '{"private":true,"allowScripts":{"@circlesac/gh2":true}}' > "$prefix/package.json" + if env -u CI npm install --prefix "$prefix" "@circlesac/gh2@$VERSION" \ + && test "$("$prefix/node_modules/.bin/gh2" --version)" = "$VERSION" \ + && "$prefix/node_modules/.bin/gh2" doctor --help >/dev/null; then + exit 0 fi - test "$attempt" -lt 10 + test "$attempt" -lt 20 sleep 15 done - test "$("$RUNNER_TEMP/npm/node_modules/.bin/gh2" --version)" = "$VERSION" - "$RUNNER_TEMP/npm/node_modules/.bin/gh2" doctor --help >/dev/null - name: Verify standalone installation shell: bash