Feat: auto release (#10557)

### What problem does this PR solve?

Add cli build to release.yml.

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Lynn
2025-10-14 21:06:27 +08:00
committed by GitHub
parent e535099f36
commit 83ec915d51
15 changed files with 49 additions and 12 deletions

View File

@@ -120,3 +120,17 @@ jobs:
packages-dir: sdk/python/dist/
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
- name: Build ragflow-cli
if: startsWith(github.ref, 'refs/tags/v')
run: |
cd admin/client && \
uv build
- name: Publish client package distributions to PyPI
if: startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: admin/client/dist/
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true

3
.gitignore vendored
View File

@@ -149,8 +149,7 @@ out
# Nuxt.js build / generate output
.nuxt
dist
admin/release
ragflow_cli.egg-info
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js

View File

@@ -26,7 +26,7 @@ It consists of a server-side Service and a command-line client (CLI), both imple
2. Launch from source code:
```bash
python admin/admin_server.py
python admin/server/admin_server.py
```
The service will start and listen for incoming connections from the CLI on the configured port.

View File

@@ -0,0 +1,24 @@
[project]
name = "ragflow-cli"
version = "0.21.0.dev5"
description = "Admin Service's client of [RAGFlow](https://github.com/infiniflow/ragflow). The Admin Service provides user management and system monitoring. "
authors = [{ name = "Lynn", email = "lynn_inf@hotmail.com" }]
license = { text = "Apache License, Version 2.0" }
readme = "README.md"
requires-python = ">=3.10,<3.13"
dependencies = [
"requests>=2.30.0,<3.0.0",
"beartype>=0.18.5,<0.19.0",
"pycryptodomex>=3.10.0",
"lark>=1.1.0",
]
[dependency-groups]
test = [
"pytest>=8.3.5",
"requests>=2.32.3",
"requests-toolbelt>=1.0.0",
]
[project.scripts]
ragflow-cli = "admin_client:main"

View File

@@ -17,7 +17,7 @@
from flask import Blueprint, request
from auth import login_verify
from admin.server.auth import login_verify
from responses import success_response, error_response
from services import UserMgr, ServiceMgr, UserServiceMgr
from api.common.exceptions import AdminException

View File

@@ -27,7 +27,7 @@ from api.utils.crypt import decrypt
from api.utils import health_utils
from api.common.exceptions import AdminException, UserAlreadyExistsError, UserNotFoundError
from config import SERVICE_CONFIGS
from admin.server.config import SERVICE_CONFIGS
class UserMgr:

View File

@@ -195,7 +195,7 @@ fi
if [[ "${ENABLE_ADMIN_SERVER}" -eq 1 ]]; then
echo "Starting admin_server..."
while true; do
"$PY" admin/admin_server.py
"$PY" admin/server/admin_server.py
done &
fi

View File

@@ -12,21 +12,21 @@ The Admin CLI and Admin Service form a client-server architectural suite for RAG
### Starting the Admin Service
## Starting the Admin Service
#### Launching from source code
### Launching from source code
1. Before start Admin Service, please make sure RAGFlow system is already started.
2. Launch from source code:
```bash
python admin/admin_server.py
python admin/server/admin_server.py
```
The service will start and listen for incoming connections from the CLI on the configured port.
#### Using docker image
### Using docker image
1. Before startup, please configure the `docker_compose.yml` file to enable admin server:
@@ -39,7 +39,7 @@ The Admin CLI and Admin Service form a client-server architectural suite for RAG
### Using the Admin CLI
## Using the Admin CLI
1. Ensure the Admin Service is running.
@@ -55,7 +55,7 @@ The Admin CLI and Admin Service form a client-server architectural suite for RAG
ragflow-cli -h 0.0.0.0 -p 9381
```
Enter superuser's password to login. Default password is `admin`.
Enter superuser's password to login. Default password is `admin`.