From 6f5245ae5825ff6d9ad48802c6ee5859d65f058c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Boschi?= Date: Thu, 26 Feb 2026 17:38:51 +0100 Subject: [PATCH] chore: integrate chat with release (#443) * integrate chat with release * integrate chat with release --- .github/workflows/release.yml | 59 ++++++++++++++++++++++++++++++++++- .github/workflows/test.yml | 23 ++++++++++++++ scripts/release.sh | 11 +++++++ 3 files changed, 92 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 48d29a20..520e23d0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -248,6 +248,55 @@ jobs: path: hindsight-integrations/ai-sdk/*.tgz retention-days: 1 + release-chat-integration: + runs-on: ubuntu-latest + environment: npm + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + working-directory: ./hindsight-integrations/chat + run: npm ci + + - name: Build + working-directory: ./hindsight-integrations/chat + run: npm run build + + - name: Publish to npm + working-directory: ./hindsight-integrations/chat + run: | + set +e + OUTPUT=$(npm publish --access public 2>&1) + EXIT_CODE=$? + echo "$OUTPUT" + if [ $EXIT_CODE -ne 0 ]; then + if echo "$OUTPUT" | grep -q "cannot publish over"; then + echo "Package version already published, skipping..." + exit 0 + fi + exit $EXIT_CODE + fi + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Pack for GitHub release + working-directory: ./hindsight-integrations/chat + run: npm pack + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: chat-integration + path: hindsight-integrations/chat/*.tgz + retention-days: 1 + release-control-plane: runs-on: ubuntu-latest environment: npm @@ -501,7 +550,7 @@ jobs: create-github-release: runs-on: ubuntu-latest - needs: [release-python-packages, release-typescript-client, release-openclaw-integration, release-ai-sdk-integration, release-control-plane, release-rust-cli, release-docker-images, release-helm-chart] + needs: [release-python-packages, release-typescript-client, release-openclaw-integration, release-ai-sdk-integration, release-chat-integration, release-control-plane, release-rust-cli, release-docker-images, release-helm-chart] permissions: contents: write @@ -536,6 +585,12 @@ jobs: name: ai-sdk-integration path: ./artifacts/ai-sdk-integration + - name: Download Chat Integration + uses: actions/download-artifact@v4 + with: + name: chat-integration + path: ./artifacts/chat-integration + - name: Download Control Plane uses: actions/download-artifact@v4 with: @@ -581,6 +636,8 @@ jobs: cp artifacts/openclaw-integration/*.tgz release-assets/ || true # AI SDK Integration cp artifacts/ai-sdk-integration/*.tgz release-assets/ || true + # Chat Integration + cp artifacts/chat-integration/*.tgz release-assets/ || true # Control Plane cp artifacts/control-plane/*.tgz release-assets/ || true # Rust CLI binaries diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 28426b50..4644a54b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -97,6 +97,29 @@ jobs: working-directory: ./hindsight-integrations/ai-sdk run: npm run build + build-chat-integration: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Install dependencies + working-directory: ./hindsight-integrations/chat + run: npm ci + + - name: Run tests + working-directory: ./hindsight-integrations/chat + run: npm test + + - name: Build + working-directory: ./hindsight-integrations/chat + run: npm run build + build-control-plane: runs-on: ubuntu-latest diff --git a/scripts/release.sh b/scripts/release.sh index 7511f394..43a03614 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -164,6 +164,16 @@ else print_warn "File $AI_SDK_PKG not found, skipping" fi +# Update Chat SDK integration +CHAT_SDK_PKG="hindsight-integrations/chat/package.json" +if [ -f "$CHAT_SDK_PKG" ]; then + print_info "Updating $CHAT_SDK_PKG" + sed -i.bak "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" "$CHAT_SDK_PKG" + rm "${CHAT_SDK_PKG}.bak" +else + print_warn "File $CHAT_SDK_PKG not found, skipping" +fi + # Update documentation version (creates new version or syncs to existing) print_info "Updating documentation for version $VERSION..." if [ -f "scripts/update-docs-version.sh" ]; then @@ -213,6 +223,7 @@ COMMIT_MSG="Release v$VERSION - Control Plane: hindsight-control-plane - OpenClaw integration: hindsight-integrations/openclaw - AI SDK integration: hindsight-integrations/ai-sdk +- Chat SDK integration: hindsight-integrations/chat - Helm chart" # Add docs update note