From a50687a055f961140f6a4fdd94227f564d1453bc Mon Sep 17 00:00:00 2001 From: nrslib <38722970+nrslib@users.noreply.github.com> Date: Wed, 11 Feb 2026 22:48:56 +0900 Subject: [PATCH] =?UTF-8?q?dist-tag=20=E6=A4=9C=E8=A8=BC=E3=82=92=E3=83=AA?= =?UTF-8?q?=E3=83=88=E3=83=A9=E3=82=A4=E4=BB=98=E3=81=8D=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4=EF=BC=88npm=20=E3=83=AC=E3=82=B8=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=83=AA=E3=81=AE=E7=B5=90=E6=9E=9C=E6=95=B4=E5=90=88=E6=80=A7?= =?UTF-8?q?=E5=AF=BE=E7=AD=96=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/auto-tag.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-tag.yml b/.github/workflows/auto-tag.yml index 502d777..1f61cad 100644 --- a/.github/workflows/auto-tag.yml +++ b/.github/workflows/auto-tag.yml @@ -86,13 +86,21 @@ jobs: - name: Verify dist-tags run: | PACKAGE_NAME=$(node -p "require('./package.json').name") - LATEST=$(npm view "${PACKAGE_NAME}" dist-tags.latest) - NEXT=$(npm view "${PACKAGE_NAME}" dist-tags.next || true) - echo "latest=${LATEST}" - echo "next=${NEXT}" + for attempt in 1 2 3 4 5; do + LATEST=$(npm view "${PACKAGE_NAME}" dist-tags.latest) + NEXT=$(npm view "${PACKAGE_NAME}" dist-tags.next || true) - if [ "${{ steps.npm-tag.outputs.tag }}" = "latest" ] && [ "${LATEST}" != "${NEXT}" ]; then - echo "Expected next to match latest on stable release, but they differ." - exit 1 - fi + echo "Attempt ${attempt}: latest=${LATEST}, next=${NEXT}" + + if [ "${{ steps.npm-tag.outputs.tag }}" != "latest" ] || [ "${LATEST}" = "${NEXT}" ]; then + echo "Dist-tags verified." + exit 0 + fi + + if [ "$attempt" -eq 5 ]; then + echo "::warning::dist-tags not synced after 5 attempts (latest=${LATEST}, next=${NEXT}). Registry propagation may be delayed." + exit 0 + fi + sleep $((attempt * 10)) + done