/** Drafts are the publication boundary. A partial build/upload is never a consumer release. */ export async function publishVerifiedRelease({ hosting, prepare }) { const release = await hosting.open(); const assets = await prepare(); if (!release.draft) { await hosting.verify(release, assets, true); return release; } for (const asset of assets) await hosting.upload(release, asset); await hosting.verify(release, assets, false); const published = await hosting.publish(release); await hosting.verify(published, assets, true); return published; }