diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 09f0171..286c25a 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -76,8 +76,10 @@ jobs: # npm tarball, in fresh temp folders with piped stdin and the fake stores, on Linux and Windows x Node 20 / Node 22 # (npx --package=) / Bun (bun x). One red cell and the commit is no candidate. macOS runs on the owner's Mac # (tools/release.ts, cached per CLI key). + # after the installers: the one Windows runner builds the release installer first, the background tests wait + # (0.8.13's Windows installer queued behind six acceptance jobs) acceptance: - needs: gate + needs: [gate, linux, windows] if: github.event_name != 'pull_request' || true strategy: fail-fast: false diff --git a/tools/release.ts b/tools/release.ts index c96807a..41b7dc3 100644 --- a/tools/release.ts +++ b/tools/release.ts @@ -455,7 +455,9 @@ async function npmRelease(version: string, token: string): Promise { await new Promise(res => setTimeout(res, 5_000)); } const dep = npmRun(['deprecate', `storebound@<${version}`, `storebound ${version} is out: npx storebound@${version}`], token); - if (dep.code !== 0) fail(`npm deprecate failed: ${dep.out.trim().split('\n').slice(-3).join(' ')}`); + // a deprecation that is already set (an earlier npm-publish run) answers 422: fine when the message is the same + if (dep.code !== 0 && /E422|Unprocessable/i.test(dep.out) && (spawnSync('npm', ['view', `storebound@<${version}`, 'deprecated'], { encoding: 'utf8', timeout: 30_000 }).stdout ?? '').includes(`storebound ${version} is out`)) say('npm: older versions were already deprecated'); + else if (dep.code !== 0) fail(`npm deprecate failed: ${dep.out.trim().split('\n').slice(-3).join(' ')}`); say(`npm: storebound@${version} published and older versions deprecated`); }