chore: integrate chat with release (#443)
* integrate chat with release * integrate chat with release
This commit is contained in:
parent
fed987f931
commit
6f5245ae58
3 changed files with 92 additions and 1 deletions
59
.github/workflows/release.yml
vendored
59
.github/workflows/release.yml
vendored
|
|
@ -248,6 +248,55 @@ jobs:
|
||||||
path: hindsight-integrations/ai-sdk/*.tgz
|
path: hindsight-integrations/ai-sdk/*.tgz
|
||||||
retention-days: 1
|
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:
|
release-control-plane:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment: npm
|
environment: npm
|
||||||
|
|
@ -501,7 +550,7 @@ jobs:
|
||||||
|
|
||||||
create-github-release:
|
create-github-release:
|
||||||
runs-on: ubuntu-latest
|
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:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
|
|
@ -536,6 +585,12 @@ jobs:
|
||||||
name: ai-sdk-integration
|
name: ai-sdk-integration
|
||||||
path: ./artifacts/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
|
- name: Download Control Plane
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -581,6 +636,8 @@ jobs:
|
||||||
cp artifacts/openclaw-integration/*.tgz release-assets/ || true
|
cp artifacts/openclaw-integration/*.tgz release-assets/ || true
|
||||||
# AI SDK Integration
|
# AI SDK Integration
|
||||||
cp artifacts/ai-sdk-integration/*.tgz release-assets/ || true
|
cp artifacts/ai-sdk-integration/*.tgz release-assets/ || true
|
||||||
|
# Chat Integration
|
||||||
|
cp artifacts/chat-integration/*.tgz release-assets/ || true
|
||||||
# Control Plane
|
# Control Plane
|
||||||
cp artifacts/control-plane/*.tgz release-assets/ || true
|
cp artifacts/control-plane/*.tgz release-assets/ || true
|
||||||
# Rust CLI binaries
|
# Rust CLI binaries
|
||||||
|
|
|
||||||
23
.github/workflows/test.yml
vendored
23
.github/workflows/test.yml
vendored
|
|
@ -97,6 +97,29 @@ jobs:
|
||||||
working-directory: ./hindsight-integrations/ai-sdk
|
working-directory: ./hindsight-integrations/ai-sdk
|
||||||
run: npm run build
|
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:
|
build-control-plane:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -164,6 +164,16 @@ else
|
||||||
print_warn "File $AI_SDK_PKG not found, skipping"
|
print_warn "File $AI_SDK_PKG not found, skipping"
|
||||||
fi
|
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)
|
# Update documentation version (creates new version or syncs to existing)
|
||||||
print_info "Updating documentation for version $VERSION..."
|
print_info "Updating documentation for version $VERSION..."
|
||||||
if [ -f "scripts/update-docs-version.sh" ]; then
|
if [ -f "scripts/update-docs-version.sh" ]; then
|
||||||
|
|
@ -213,6 +223,7 @@ COMMIT_MSG="Release v$VERSION
|
||||||
- Control Plane: hindsight-control-plane
|
- Control Plane: hindsight-control-plane
|
||||||
- OpenClaw integration: hindsight-integrations/openclaw
|
- OpenClaw integration: hindsight-integrations/openclaw
|
||||||
- AI SDK integration: hindsight-integrations/ai-sdk
|
- AI SDK integration: hindsight-integrations/ai-sdk
|
||||||
|
- Chat SDK integration: hindsight-integrations/chat
|
||||||
- Helm chart"
|
- Helm chart"
|
||||||
|
|
||||||
# Add docs update note
|
# Add docs update note
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue