Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ jobs:
run: |
set -euo pipefail

for attempt in {1..10}; do
visible_version="$(npm view "@call-e/calle@${PACKAGE_VERSION}" version 2>/dev/null || true)"
latest_version="$(npm view '@call-e/calle' dist-tags.latest 2>/dev/null || true)"
for attempt in {1..30}; do
visible_version="$(npm view "@call-e/calle@${PACKAGE_VERSION}" version --prefer-online --registry https://registry.npmjs.org 2>/dev/null || true)"
latest_version="$(npm view '@call-e/calle' dist-tags.latest --prefer-online --registry https://registry.npmjs.org 2>/dev/null || true)"
if [[ "$visible_version" == "$PACKAGE_VERSION" && "$latest_version" == "$PACKAGE_VERSION" ]]; then
exit 0
fi
Expand All @@ -294,8 +294,8 @@ jobs:
cd "$smoke_dir"
npm init -y >/dev/null

for attempt in {1..10}; do
if npm install --ignore-scripts --no-audit --no-fund "@call-e/calle@${PACKAGE_VERSION}"; then
for attempt in {1..30}; do
if npm install --prefer-online --registry https://registry.npmjs.org --ignore-scripts --no-audit --no-fund "@call-e/calle@${PACKAGE_VERSION}"; then
if node --input-type=module -e 'import { CalleClient } from "@call-e/calle"; const client = new CalleClient({ apiKey: "smoke" }); if (typeof client.goals.runAndWait !== "function") process.exit(1);' && ./node_modules/.bin/calle --help | grep "Usage:" >/dev/null; then
exit 0
fi
Expand Down
7 changes: 4 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ retrying that exact request. Record the returned Goal Run id and verify that

## Post-publish verification

The workflow waits for exact-version registry metadata, installs the published
package in a temporary project, imports `CalleClient`, and runs the packaged
CLI help command.
The workflow polls registry metadata and installation availability at ten-second
intervals for up to 30 attempts each. Checks prefer fresh registry responses
over cached preflight metadata. It installs the published package in a temporary
project, imports `CalleClient`, and runs the packaged CLI help command.

A failure in either post-publish check does not mean publication failed. If the
`npm publish` step succeeded, do not retry the same version. Check the registry
Expand Down
Loading