From 6cccd179f5e14097a9f50e6cfa89b96e131c6262 Mon Sep 17 00:00:00 2001 From: Developer Date: Thu, 12 Feb 2026 00:05:42 +0000 Subject: [PATCH] fix(ci): force-install cross-platform opentui native bindings Platform packages have os/cpu fields that cause both bun and npm to skip them on incompatible platforms. Use npm pack + tar to download and extract tarballs directly into node_modules, bypassing platform checks for cross-compilation. --- .github/workflows/publish.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cb498c85..af0f7c8b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -36,9 +36,18 @@ jobs: - name: Install all platform-specific opentui native bindings run: | - bun add --optional @opentui/core-darwin-x64@0.1.79 @opentui/core-darwin-arm64@0.1.79 \ - @opentui/core-linux-x64@0.1.79 @opentui/core-linux-arm64@0.1.79 \ - @opentui/core-win32-x64@0.1.79 @opentui/core-win32-arm64@0.1.79 + # Platform packages have os/cpu fields that block install on foreign platforms. + # Download and extract tarballs directly to bypass platform checks. + OPENTUI_VERSION="0.1.79" + for platform in darwin-x64 darwin-arm64 linux-arm64 win32-x64 win32-arm64; do + pkg="@opentui/core-${platform}" + dest="node_modules/@opentui/core-${platform}" + if [ ! -d "$dest" ]; then + mkdir -p "$dest" + npm pack "${pkg}@${OPENTUI_VERSION}" --pack-destination /tmp 2>/dev/null + tar -xzf "/tmp/opentui-core-${platform}-${OPENTUI_VERSION}.tgz" -C "$dest" --strip-components=1 + fi + done # TODO: Re-enable after fixing failing tests # - name: Run tests