mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 20:14:36 +00:00
* refactor(web): migrate from Next.js to Vite + React Router
* fix: update build pipelines for Vite migration (out → dist)
- Dockerfile: npm run build → npx vite build, web/out → web/dist
- pyproject.toml: package-data web/out/** → web/dist/**
- paths.py: support both web/dist (Vite) and web/out (legacy) with fallback
* fix: remove .next from git tracking, add to .gitignore
1334 cached files from web/.next/ were accidentally committed.
Added .next/ to both root and web/.gitignore.
* fix: update build process to use Vite and correct output directory
* fix: update pnpm-lock.yaml and eslint config for Vite migration
* style: fix prettier formatting issues
* fix: add eslint-plugin-react-hooks for Vite migration
* fix: remove undefined eslint rule reference, downgrade react-hooks plugin to v5
* fix(web): clean up remaining Next.js artifacts in Vite migration
- Add vite-env.d.ts for import.meta.env and asset type declarations
- Remove dead layout.tsx (providers already in main.tsx)
- Fix useSearchParams destructuring to [searchParams] tuple (11 locations)
- Replace process.env.NEXT_PUBLIC_* with import.meta.env.VITE_*
- Fix langbotIcon.src to langbotIcon (Vite returns URL string)
- Fix Link href to Link to for react-router-dom
- Fix navigate({ scroll: false }) to { preventScrollReset: true }
- Fix [router] dependency arrays to [navigate]
- Remove Next.js plugin from tsconfig, set rsc: false in components.json
- Replace next lint with eslint in lint-staged
* feat: add tools API endpoint and tools-selector form type
Backend:
- Add GET /api/v1/tools — list all available tools (plugin + MCP)
- Add GET /api/v1/tools/<tool_name> — get specific tool details
Frontend:
- Add TOOLS_SELECTOR form type for plugin config forms
- Multi-select dialog with tool name and description
- Add PluginTool entity type and API client methods
* Revert "feat: add tools API endpoint and tools-selector form type"
This reverts commit 3c637fc563.
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
name: Build Release Artifacts
|
||
|
||
on:
|
||
workflow_dispatch:
|
||
## 发布release的时候会自动构建
|
||
release:
|
||
types: [published]
|
||
|
||
jobs:
|
||
build-artifacts:
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- name: Checkout
|
||
uses: actions/checkout@v2
|
||
with:
|
||
persist-credentials: false
|
||
|
||
- name: Check version
|
||
id: check_version
|
||
run: |
|
||
echo $GITHUB_REF
|
||
# 如果是tag,则去掉refs/tags/前缀
|
||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||
echo "It's a tag"
|
||
echo $GITHUB_REF
|
||
echo $GITHUB_REF | awk -F '/' '{print $3}'
|
||
echo ::set-output name=version::$(echo $GITHUB_REF | awk -F '/' '{print $3}')
|
||
else
|
||
echo "It's not a tag"
|
||
echo $GITHUB_REF
|
||
echo ::set-output name=version::${GITHUB_REF}
|
||
fi
|
||
|
||
- name: Make Temp Directory
|
||
run: |
|
||
mkdir -p /tmp/langbot_build_web
|
||
cp -r . /tmp/langbot_build_web
|
||
- name: Setup Node
|
||
uses: actions/setup-node@v2
|
||
with:
|
||
node-version: '22'
|
||
- name: Build Web
|
||
run: |
|
||
cd /tmp/langbot_build_web/web
|
||
npm install
|
||
npx vite build
|
||
- name: Package Output
|
||
run: |
|
||
cp -r /tmp/langbot_build_web/web/dist ./web
|
||
- name: Upload Artifact
|
||
uses: actions/upload-artifact@v4
|
||
with:
|
||
name: langbot-${{ steps.check_version.outputs.version }}-all
|
||
path: .
|
||
|
||
- name: Upload To Release
|
||
env:
|
||
GH_TOKEN: ${{ secrets.RELEASE_UPLOAD_GITHUB_TOKEN }}
|
||
run: |
|
||
# 本目录下所有文件打包成zip
|
||
zip -r langbot-${{ steps.check_version.outputs.version }}-all.zip .
|
||
gh release upload ${{ github.event.release.tag_name }} langbot-${{ steps.check_version.outputs.version }}-all.zip
|