Skip to content

Commit 014b6d7

Browse files
committed
chore: publish retry
1 parent 4c5ed13 commit 014b6d7

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎.github/workflows/publish-libs.yml‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,19 @@ jobs:
260260
NPM_TAG=$(node ../scripts/determine-npm-tag.js "$PUBLISHED_VERSION" "$THIS_VERSION")
261261
fi
262262
263-
yarn lerna publish from-package --tag-version-prefix='' --dist-tag $NPM_TAG --concurrency 1 --yes
263+
# Rekor sometimes records a provenance entry but fails the response; the client's
264+
# internal retry then gets a 409 and aborts. from-package skips already-published
265+
# packages, and each attempt signs with a fresh certificate, so retrying is safe.
266+
for attempt in 1 2 3; do
267+
if yarn lerna publish from-package --tag-version-prefix='' --dist-tag $NPM_TAG --concurrency 1 --yes; then
268+
break
269+
fi
270+
if [ "$attempt" = "3" ]; then
271+
exit 1
272+
fi
273+
echo "Publish attempt $attempt failed, retrying in 15s..."
274+
sleep 15
275+
done
264276
265277
LERNA_VERSION=$(node -p "require('./lerna.json').version")
266278
NEW_VERSION=$(node -p "require('./shared-lib/package.json').version")

0 commit comments

Comments
 (0)