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