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)
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
|
||||
> [!TIP]
|
||||
>
|
||||
> [](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0-beta.1)
|
||||
> > **オーケストレーターがベータ版で利用可能になりました。`oh-my-opencode@3.0.0-beta.1`を使用してインストールしてください。**
|
||||
> [](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0-beta.10)
|
||||
> > **オーケストレーターがベータ版で利用可能になりました。`oh-my-opencode@3.0.0-beta.10`を使用してインストールしてください。**
|
||||
>
|
||||
> 一緒に歩みましょう!
|
||||
>
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
> [!TIP]
|
||||
>
|
||||
> [](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.**
|
||||
> [](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!
|
||||
>
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
> [!TIP]
|
||||
>
|
||||
> [](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0-beta.1)
|
||||
> > **Orchestrator 现已进入测试阶段。使用 `oh-my-opencode@3.0.0-beta.1` 安装。**
|
||||
> [](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0-beta.10)
|
||||
> > **Orchestrator 现已进入测试阶段。使用 `oh-my-opencode@3.0.0-beta.10` 安装。**
|
||||
>
|
||||
> 加入我们!
|
||||
>
|
||||
|
||||
@@ -192,16 +192,23 @@ async function publishAllPackages(version: string): Promise<void> {
|
||||
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<void> {
|
||||
}
|
||||
} 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
|
||||
|
||||
Reference in New Issue
Block a user