From 6a4bac94785c440beecd4501079e6a9619b75962 Mon Sep 17 00:00:00 2001 From: justsisyphus Date: Sun, 18 Jan 2026 13:12:08 +0900 Subject: [PATCH] fix(ci): parallelize npm publish to prevent OIDC token expiration - Publish platform packages in parallel using Promise.all() - Update README versions to beta.10 (EN, JA, ZH-CN) --- README.ja.md | 4 ++-- README.md | 4 ++-- README.zh-cn.md | 4 ++-- script/publish.ts | 21 ++++++++++++++++----- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/README.ja.md b/README.ja.md index bf49f2fcd..20df2369c 100644 --- a/README.ja.md +++ b/README.ja.md @@ -5,8 +5,8 @@ > [!TIP] > -> [![The Orchestrator is now available in beta.](./.github/assets/orchestrator-sisyphus.png?v=3)](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0-beta.1) -> > **オーケストレーターがベータ版で利用可能になりました。`oh-my-opencode@3.0.0-beta.1`を使用してインストールしてください。** +> [![The Orchestrator is now available in beta.](./.github/assets/orchestrator-sisyphus.png?v=3)](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0-beta.10) +> > **オーケストレーターがベータ版で利用可能になりました。`oh-my-opencode@3.0.0-beta.10`を使用してインストールしてください。** > > 一緒に歩みましょう! > diff --git a/README.md b/README.md index a72c135aa..f3eed6bdb 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ > [!TIP] > -> [![The Orchestrator is now available in beta.](./.github/assets/orchestrator-sisyphus.png?v=3)](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0-beta.7) -> > **The Orchestrator is now available in beta. Use `oh-my-opencode@3.0.0-beta.7` to install it.** +> [![The Orchestrator is now available in beta.](./.github/assets/orchestrator-sisyphus.png?v=3)](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0-beta.10) +> > **The Orchestrator is now available in beta. Use `oh-my-opencode@3.0.0-beta.10` to install it.** > > Be with us! > diff --git a/README.zh-cn.md b/README.zh-cn.md index e893fc665..4b67dbd17 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -5,8 +5,8 @@ > [!TIP] > -> [![Orchestrator 现已进入测试阶段。](./.github/assets/orchestrator-sisyphus.png?v=3)](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0-beta.1) -> > **Orchestrator 现已进入测试阶段。使用 `oh-my-opencode@3.0.0-beta.1` 安装。** +> [![Orchestrator 现已进入测试阶段。](./.github/assets/orchestrator-sisyphus.png?v=3)](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0-beta.10) +> > **Orchestrator 现已进入测试阶段。使用 `oh-my-opencode@3.0.0-beta.10` 安装。** > > 加入我们! > diff --git a/script/publish.ts b/script/publish.ts index f082457ee..b6558f608 100644 --- a/script/publish.ts +++ b/script/publish.ts @@ -192,16 +192,23 @@ async function publishAllPackages(version: string): Promise { if (skipPlatform) { console.log("\n⏭️ Skipping platform packages (SKIP_PLATFORM_PACKAGES=true)") } else { - console.log("\n📦 Publishing platform packages...") + console.log("\n📦 Publishing platform packages in parallel...") - // Publish platform packages first - for (const platform of PLATFORM_PACKAGES) { + // Publish platform packages in parallel for speed (avoids OIDC token expiration) + const publishPromises = PLATFORM_PACKAGES.map(async (platform) => { const pkgDir = join(process.cwd(), "packages", platform) const pkgName = `oh-my-opencode-${platform}` - console.log(`\n Publishing ${pkgName}...`) + console.log(` Starting ${pkgName}...`) const result = await publishPackage(pkgDir, distTag) + return { platform, pkgName, result } + }) + + const results = await Promise.all(publishPromises) + + const failures: string[] = [] + for (const { pkgName, result } of results) { if (result.success) { if (result.alreadyPublished) { console.log(` ✓ ${pkgName}@${version} (already published)`) @@ -210,9 +217,13 @@ async function publishAllPackages(version: string): Promise { } } else { console.error(` ✗ ${pkgName} failed: ${result.error}`) - throw new Error(`Failed to publish ${pkgName}`) + failures.push(pkgName) } } + + if (failures.length > 0) { + throw new Error(`Failed to publish: ${failures.join(", ")}`) + } } // Publish main package last