Skip to content

fix(mcp): restore cloud-snapshot mode for Recce Summary agent (DRC-3384) #183

fix(mcp): restore cloud-snapshot mode for Recce Summary agent (DRC-3384)

fix(mcp): restore cloud-snapshot mode for Recce Summary agent (DRC-3384) #183

Workflow file for this run

name: Official Recce Release
on:
push:
tags: 'v*'
permissions:
contents: read
jobs:
build:
name: Build Recce Official Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Setup Node 24
uses: actions/setup-node@v4
with:
node-version: '24'
- uses: pnpm/action-setup@v4
with:
version: 10
- name: Install dependencies
run: |
# Install Python dependencies
uv sync --all-extras --python 3.10
# Install Node dependencies
pushd js
pnpm install --frozen-lockfile
popd
- name: Patch Recce Version
id: patch_version
run: |
# Patch version
echo "${GITHUB_REF:11}" > ./recce/VERSION
echo "Release Version: $(cat recce/VERSION)"
echo "release_version=$(cat recce/VERSION)" >> $GITHUB_OUTPUT
- name: Patch Event API Key
run: |
# Patch Event API Key
sed -i.bak "s/<API_KEY>/${EVENT_API_KEY}/" recce/event/CONFIG
env:
EVENT_API_KEY: ${{ secrets.AMPLITUDE_API_KEY }}
- name: Build Front-end Static Files
run: |
# Build static files
pushd js
pnpm build
popd
env:
AMPLITUDE_API_KEY: ${{ secrets.AMPLITUDE_API_KEY }}
GTM_ID: ${{ secrets.GTM_ID }}
- name: Release to Pypi
run: |
# generate pypirc
echo "$PYPIRC" > $HOME/.pypirc
# build and upload to pypi
uv build
uv run twine upload dist/*
env:
PYPIRC: ${{ secrets.PYPI }}
- name: Mark Sentry Release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: infuseai
SENTRY_PROJECT: recce
with:
environment: production
ignore_empty: true
ignore_missing: true
version: ${{ steps.patch_version.outputs.release_version }}
- name: Upload version artifact for UI release
uses: actions/upload-artifact@v4
with:
name: recce-release-version
path: recce/VERSION
retention-days: 1
build-recce-cloud:
name: Build Recce Cloud Official Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install dependencies
run: |
# Install Python dependencies
uv sync --all-extras --python 3.10
- name: Patch Recce Cloud Version
id: patch_version
run: |
# Patch version from tag directly to recce_cloud/recce_cloud/VERSION
echo "${GITHUB_REF:11}" > ./recce_cloud/recce_cloud/VERSION
echo "Release Version: $(cat recce_cloud/recce_cloud/VERSION)"
echo "release_version=$(cat recce_cloud/recce_cloud/VERSION)" >> $GITHUB_OUTPUT
- name: Release to Pypi
run: |
# generate pypirc
echo "$PYPIRC" > $HOME/.pypirc
# build and upload recce-cloud to pypi
uv build --package recce-cloud
uv run twine upload dist/*
env:
PYPIRC: ${{ secrets.PYPI }}
- name: Mark Sentry Release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: infuseai
SENTRY_PROJECT: recce-cloud
with:
environment: production
ignore_empty: true
ignore_missing: true
version: ${{ steps.patch_version.outputs.release_version }}
trigger-build-recce-instance-launcher-image:
name: Trigger Recce Instance Launcher Image Build
runs-on: ubuntu-latest
permissions:
contents: read
needs: build
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ secrets.RECCE_ACTION_BOT_APP_ID }}
private-key: ${{ secrets.RECCE_ACTION_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Fetch latest release from Recce Cloud Infra repo
id: latest-recce-cloud-release
env:
TOKEN: ${{ steps.app-token.outputs.token }}
ORG: DataRecce
REPO: recce-cloud-infra
run: |
tag=$(curl -sS --fail-with-body \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${TOKEN}" \
https://api.github.com/repos/${ORG}/${REPO}/releases/latest \
| jq -r .tag_name)
if [ -z "$tag" ] || [ "$tag" = "null" ]; then
echo "Error: Failed to fetch latest release tag from ${ORG}/${REPO}"
exit 1
fi
echo "tag_name=$tag" >> "$GITHUB_OUTPUT"
echo "Fetched latest release: $tag"
- name: Trigger Recce Instance Launcher Image Build Workflow
id: dispatch
continue-on-error: true
uses: benc-uk/workflow-dispatch@v1
with:
workflow: 'build-recce-instance-launcher.yml'
repo: 'DataRecce/recce-cloud-infra'
ref: ${{ steps.latest-recce-cloud-release.outputs.tag_name }}
inputs: '{ "environment": "production" }'
token: '${{ steps.app-token.outputs.token }}'
- name: Handle dispatch failure
if: steps.dispatch.outcome == 'failure'
run: |
echo "::warning::Failed to trigger recce-cloud-infra build workflow"
echo "::warning::Please manually trigger the build at: https://github.com/DataRecce/recce-cloud-infra/actions/workflows/build-recce-instance-launcher.yml"
echo "::warning::Use ref: ${{ steps.latest-recce-cloud-release.outputs.tag_name }} and environment: production"