Skip to content

Commit 4da08dd

Browse files
committed
ci(release): retry npm registry smoke
1 parent 72fca9f commit 4da08dd

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,16 @@ jobs:
8989
- name: Post-publish registry smoke
9090
if: ${{ inputs.dry-run != true }}
9191
run: |
92-
sleep 10
93-
npm view "@bitkyc08/opencodex@${{ inputs.version }}" version dist-tags
92+
for attempt in $(seq 1 30); do
93+
if VERSION=$(npm view "@bitkyc08/opencodex@${{ inputs.version }}" version 2>/dev/null); then
94+
echo "registry version=$VERSION"
95+
test "$VERSION" = "${{ inputs.version }}"
96+
npm dist-tag ls @bitkyc08/opencodex
97+
exit 0
98+
fi
99+
echo "::notice::@bitkyc08/opencodex@${{ inputs.version }} not visible in npm registry yet (attempt $attempt/30)"
100+
sleep 10
101+
done
102+
echo "::error::npm registry smoke failed after 30 attempts"
103+
npm view @bitkyc08/opencodex versions dist-tags --json || true
104+
exit 1

0 commit comments

Comments
 (0)