refactor: 项目更名 WeKnora → Academy
Build & Publish (dsh-academy) / End-to-end inside dsh (latest, advisory) (push) Skipped
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Frontend / Docker multi-stage image (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-academy) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-academy) / Publish to npm (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Helm / chart (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (latest, advisory) (push) Skipped
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Frontend / Docker multi-stage image (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-academy) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-academy) / Publish to npm (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Helm / chart (push) Canceled after 0s
- 全量替换代码/配置/文档中的项目名(保留上游 GitHub 链接、weixin 文档域名、Docker Hub 镜像名) - 重命名 32 个含项目名的文件/目录;Go module 路径改为 academy(含 client/cli 子模块) - docreader proto 描述符采用等长替换,保持序列化字节布局有效 - Dockerfile.app 构建网络修复: browserskill 离线产物通道、PyPI/apt 国内镜像 - 运行验证: go build ✓ docker compose up ✓ 健康检查 ✓
This commit is contained in:
1 parent
9097ee699d
commit
9058149576
3136 files changed
+18018
-18004
No files matched your search
@@ -65,7 +65,7 @@ jobs:
|
||||
run: ./scripts/build-anydoc-lib.sh
|
||||
|
||||
# The vendored bindings pull anydoc and its PDF stack from crates.io, and
|
||||
# WeKnora parses untrusted uploads in-process. A Rust advisory there (as
|
||||
# Academy parses untrusted uploads in-process. A Rust advisory there (as
|
||||
# in RUSTSEC-2026-0187, an uncatchable abort on a hostile PDF) has to
|
||||
# break the build, not wait for someone to notice. Vulnerabilities fail
|
||||
# the job; unmaintained-crate warnings only report, since a transitive
|
||||
|
||||
@@ -78,7 +78,7 @@ env:
|
||||
GO_VERSION: "1.26"
|
||||
GOPROXY: https://proxy.golang.org,direct
|
||||
# Keep tests independent of a developer machine's custom log template.
|
||||
WEKNORA_LOG_FORMAT: ""
|
||||
ACADEMY_LOG_FORMAT: ""
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
name: CLI E2E
|
||||
|
||||
# Runs the cli/acceptance/e2e/ suite against a real WeKnora server.
|
||||
# Runs the cli/acceptance/e2e/ suite against a real Academy server.
|
||||
# Cost-gated so it doesn't fire on every PR:
|
||||
# - workflow_dispatch: maintainer can trigger manually
|
||||
# - pull_request labeled "acceptance-e2e": adding the label kicks a run
|
||||
#
|
||||
# Required repo secrets (only set on Tencent/WeKnora; cross-fork PRs have no
|
||||
# access and the job exits early via the secrets-present guard):
|
||||
# WEKNORA_E2E_HOST - https URL of the test server
|
||||
# WEKNORA_E2E_TOKEN - bearer token / API key for that host
|
||||
# ACADEMY_E2E_HOST - https URL of the test server
|
||||
# ACADEMY_E2E_TOKEN - bearer token / API key for that host
|
||||
#
|
||||
# Mirrors gh acceptance/ trigger pattern: env-gated, opt-in, single matrix.
|
||||
|
||||
@@ -48,11 +48,11 @@ jobs:
|
||||
- name: secrets present
|
||||
id: secrets
|
||||
env:
|
||||
E2E_HOST: ${{ secrets.WEKNORA_E2E_HOST }}
|
||||
E2E_TOKEN: ${{ secrets.WEKNORA_E2E_TOKEN }}
|
||||
E2E_HOST: ${{ secrets.ACADEMY_E2E_HOST }}
|
||||
E2E_TOKEN: ${{ secrets.ACADEMY_E2E_TOKEN }}
|
||||
run: |
|
||||
if [ -z "$E2E_HOST" ] || [ -z "$E2E_TOKEN" ]; then
|
||||
echo "::warning::WEKNORA_E2E_HOST or WEKNORA_E2E_TOKEN not set; skipping e2e."
|
||||
echo "::warning::ACADEMY_E2E_HOST or ACADEMY_E2E_TOKEN not set; skipping e2e."
|
||||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "skip=false" >> "$GITHUB_OUTPUT"
|
||||
@@ -61,6 +61,6 @@ jobs:
|
||||
- name: go test -tags=acceptance_e2e
|
||||
if: steps.secrets.outputs.skip == 'false'
|
||||
env:
|
||||
WEKNORA_E2E_HOST: ${{ secrets.WEKNORA_E2E_HOST }}
|
||||
WEKNORA_E2E_TOKEN: ${{ secrets.WEKNORA_E2E_TOKEN }}
|
||||
ACADEMY_E2E_HOST: ${{ secrets.ACADEMY_E2E_HOST }}
|
||||
ACADEMY_E2E_TOKEN: ${{ secrets.ACADEMY_E2E_TOKEN }}
|
||||
run: go test -tags=acceptance_e2e -v -timeout=8m ./acceptance/e2e/...
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
id: meta
|
||||
uses: docker/metadata-action@v6
|
||||
with:
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/weknora-ui
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/academy-ui
|
||||
|
||||
- name: Build ui Image
|
||||
uses: docker/build-push-action@v7
|
||||
@@ -90,7 +90,7 @@ jobs:
|
||||
id: meta
|
||||
uses: docker/metadata-action@v6
|
||||
with:
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/weknora-docreader
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/academy-docreader
|
||||
|
||||
- name: Build docreader Image
|
||||
uses: docker/build-push-action@v7
|
||||
@@ -123,7 +123,7 @@ jobs:
|
||||
id: meta
|
||||
uses: docker/metadata-action@v6
|
||||
with:
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/weknora-sandbox
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/academy-sandbox
|
||||
|
||||
- name: Build sandbox Image
|
||||
uses: docker/build-push-action@v7
|
||||
@@ -144,7 +144,7 @@ jobs:
|
||||
id: meta-cube
|
||||
uses: docker/metadata-action@v6
|
||||
with:
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/weknora-sandbox
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/academy-sandbox
|
||||
flavor: |
|
||||
suffix=-cube,onlatest=true
|
||||
|
||||
@@ -165,7 +165,7 @@ jobs:
|
||||
id: meta-desktop
|
||||
uses: docker/metadata-action@v6
|
||||
with:
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/weknora-sandbox
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/academy-sandbox
|
||||
flavor: |
|
||||
suffix=-desktop,onlatest=true
|
||||
|
||||
@@ -186,7 +186,7 @@ jobs:
|
||||
id: meta-desktop-cube
|
||||
uses: docker/metadata-action@v6
|
||||
with:
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/weknora-sandbox
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/academy-sandbox
|
||||
flavor: |
|
||||
suffix=-desktop-cube,onlatest=true
|
||||
|
||||
@@ -232,7 +232,7 @@ jobs:
|
||||
id: meta
|
||||
uses: docker/metadata-action@v6
|
||||
with:
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/weknora-app
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/academy-app
|
||||
|
||||
- name: Prepare version info
|
||||
id: version
|
||||
@@ -264,7 +264,7 @@ jobs:
|
||||
${{ format('GO_VERSION_ARG={0}', steps.version.outputs.go_version) }}
|
||||
WITH_ANYDOC=1
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/weknora-app
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/academy-app
|
||||
cache-from: type=gha,scope=build-app-${{ env.PLATFORM_PAIR }}
|
||||
cache-to: type=gha,scope=build-app-${{ env.PLATFORM_PAIR }},mode=max
|
||||
outputs: type=image,push-by-digest=true,name-canonical=true,push=true
|
||||
@@ -308,14 +308,14 @@ jobs:
|
||||
id: meta
|
||||
uses: docker/metadata-action@v6
|
||||
with:
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/weknora-app
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/academy-app
|
||||
|
||||
- name: Create manifest list and push
|
||||
working-directory: ${{ runner.temp }}/digests
|
||||
run: |
|
||||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||
$(printf '${{ secrets.DOCKERHUB_USERNAME }}/weknora-app@sha256:%s ' *)
|
||||
$(printf '${{ secrets.DOCKERHUB_USERNAME }}/academy-app@sha256:%s ' *)
|
||||
|
||||
- name: Inspect image
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ secrets.DOCKERHUB_USERNAME }}/weknora-app:${{ steps.meta.outputs.version }}
|
||||
docker buildx imagetools inspect ${{ secrets.DOCKERHUB_USERNAME }}/academy-app:${{ steps.meta.outputs.version }}
|
||||
@@ -1,13 +1,13 @@
|
||||
name: Build & Publish (dsh-weknora)
|
||||
name: Build & Publish (dsh-academy)
|
||||
|
||||
# Build, test, and publish the DeepSeek Harness plugin (packages/dsh-weknora/) to npm.
|
||||
# Build, test, and publish the DeepSeek Harness plugin (packages/dsh-academy/) to npm.
|
||||
#
|
||||
# Three jobs:
|
||||
# test typecheck, unit tests, both halves of the contract, and a
|
||||
# packaging check
|
||||
# e2e install the package into a throwaway dsh profile and drive real
|
||||
# tool calls through the harness agent loop against a mock backend
|
||||
# publish on a `dsh-weknora-v*` tag only, publish to npm with provenance
|
||||
# publish on a `dsh-academy-v*` tag only, publish to npm with provenance
|
||||
#
|
||||
# The e2e job pins the harness version so a plugin change is the only thing that
|
||||
# can turn it red. The weekly drift job runs the same check against dsh@latest and
|
||||
@@ -18,13 +18,13 @@ on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags:
|
||||
- "dsh-weknora-v*"
|
||||
- "dsh-academy-v*"
|
||||
paths:
|
||||
- "packages/dsh-weknora/**"
|
||||
- "packages/dsh-academy/**"
|
||||
- ".github/workflows/dsh-plugin.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "packages/dsh-weknora/**"
|
||||
- "packages/dsh-academy/**"
|
||||
- ".github/workflows/dsh-plugin.yml"
|
||||
schedule:
|
||||
# Monday 03:00 UTC: catch a harness release that breaks the plugin.
|
||||
@@ -40,11 +40,11 @@ permissions:
|
||||
|
||||
env:
|
||||
# The harness release this plugin is verified against. Bump it together with
|
||||
# the compatibility note in packages/dsh-weknora/README.md.
|
||||
# the compatibility note in packages/dsh-academy/README.md.
|
||||
DSH_PINNED_SPEC: "@deepseek-ai/dsh@0.1.0-rc.8"
|
||||
# The contract's Go half lives in this repository's module. app.yml runs it
|
||||
# only for a Go diff, so a change to the fixture or to the plugin alone would
|
||||
# otherwise skip the side that checks WeKnora still serves those calls.
|
||||
# otherwise skip the side that checks Academy still serves those calls.
|
||||
GO_VERSION: "1.26"
|
||||
# `dsh plugin add` shells out to pnpm to install into the profile, and the
|
||||
# runner image ships only npm and yarn. The profile it writes carries its
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
timeout-minutes: 15
|
||||
defaults:
|
||||
run:
|
||||
working-directory: packages/dsh-weknora
|
||||
working-directory: packages/dsh-academy
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
cache-dependency-path: packages/dsh-weknora/package-lock.json
|
||||
cache-dependency-path: packages/dsh-academy/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci || npm install
|
||||
@@ -85,9 +85,9 @@ jobs:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
cache: true
|
||||
|
||||
- name: Contract tests against WeKnora's Go types
|
||||
- name: Contract tests against Academy's Go types
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: go test ./packages/dsh-weknora/contract/...
|
||||
run: go test ./packages/dsh-academy/contract/...
|
||||
|
||||
- name: Pack and verify the published file list
|
||||
run: |
|
||||
@@ -117,7 +117,7 @@ jobs:
|
||||
timeout-minutes: 25
|
||||
defaults:
|
||||
run:
|
||||
working-directory: packages/dsh-weknora
|
||||
working-directory: packages/dsh-academy
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
@@ -125,7 +125,7 @@ jobs:
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
cache-dependency-path: packages/dsh-weknora/package-lock.json
|
||||
cache-dependency-path: packages/dsh-academy/package-lock.json
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
@@ -149,15 +149,15 @@ jobs:
|
||||
env:
|
||||
DSH_PACKAGE_SPEC: ${{ env.DSH_PINNED_SPEC }}
|
||||
DSH_INSTALL_DIR: ${{ github.workspace }}/.cache/dsh-e2e-install
|
||||
DSH_E2E_LOG: ${{ runner.temp }}/dsh-weknora-e2e.log
|
||||
DSH_E2E_LOG: ${{ runner.temp }}/dsh-academy-e2e.log
|
||||
run: node test/e2e/run-in-dsh.mjs
|
||||
|
||||
- name: Upload the transcript
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dsh-weknora-e2e-transcript
|
||||
path: ${{ runner.temp }}/dsh-weknora-e2e.log
|
||||
name: dsh-academy-e2e-transcript
|
||||
path: ${{ runner.temp }}/dsh-academy-e2e.log
|
||||
if-no-files-found: ignore
|
||||
|
||||
drift:
|
||||
@@ -168,7 +168,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
defaults:
|
||||
run:
|
||||
working-directory: packages/dsh-weknora
|
||||
working-directory: packages/dsh-academy
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
@@ -176,7 +176,7 @@ jobs:
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
cache-dependency-path: packages/dsh-weknora/package-lock.json
|
||||
cache-dependency-path: packages/dsh-academy/package-lock.json
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
@@ -208,7 +208,7 @@ jobs:
|
||||
publish:
|
||||
name: Publish to npm
|
||||
needs: [test, e2e]
|
||||
if: startsWith(github.ref, 'refs/tags/dsh-weknora-v')
|
||||
if: startsWith(github.ref, 'refs/tags/dsh-academy-v')
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
permissions:
|
||||
@@ -216,10 +216,10 @@ jobs:
|
||||
id-token: write
|
||||
environment:
|
||||
name: npm-publish
|
||||
url: https://www.npmjs.com/package/@wxg-prc-cpg/dsh-weknora
|
||||
url: https://www.npmjs.com/package/@wxg-prc-cpg/dsh-academy
|
||||
defaults:
|
||||
run:
|
||||
working-directory: packages/dsh-weknora
|
||||
working-directory: packages/dsh-academy
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
@@ -228,7 +228,7 @@ jobs:
|
||||
node-version: "24"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
cache: npm
|
||||
cache-dependency-path: packages/dsh-weknora/package-lock.json
|
||||
cache-dependency-path: packages/dsh-academy/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci || npm install
|
||||
@@ -240,10 +240,10 @@ jobs:
|
||||
run: |
|
||||
set -e
|
||||
version="$(node -p "require('./package.json').version")"
|
||||
expected="dsh-weknora-v${version}"
|
||||
expected="dsh-academy-v${version}"
|
||||
if [ "$GITHUB_REF_NAME" != "$expected" ]; then
|
||||
echo "::error::tag $GITHUB_REF_NAME does not name the packaged version $version (expected $expected)."
|
||||
echo "::error::Bump packages/dsh-weknora/package.json, or retag — publishing here would ship a version the tag does not name."
|
||||
echo "::error::Bump packages/dsh-academy/package.json, or retag — publishing here would ship a version the tag does not name."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -68,8 +68,8 @@ jobs:
|
||||
docker build \
|
||||
-f frontend/Dockerfile \
|
||||
--build-arg VITE_FRONTEND_COMMIT="${GITHUB_SHA::7}" \
|
||||
-t weknora-ui:ci \
|
||||
-t academy-ui:ci \
|
||||
frontend/
|
||||
|
||||
- name: Test embed and MCP proxy routes
|
||||
run: python3 scripts/test_embed_nginx.py weknora-ui:ci
|
||||
run: python3 scripts/test_embed_nginx.py academy-ui:ci
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
render_image() {
|
||||
local template="$1"
|
||||
shift
|
||||
helm template weknora ./helm \
|
||||
helm template academy ./helm \
|
||||
--show-only "$template" \
|
||||
--set secrets.dbPassword=test \
|
||||
--set secrets.redisPassword=test \
|
||||
|
||||
@@ -6,7 +6,7 @@ name: Build & Publish (mcp-server)
|
||||
#
|
||||
# Release policy: publishing does NOT depend on tags. Bump the version in
|
||||
# mcp-server/pyproject.toml (and the synced version strings in setup.py,
|
||||
# __init__.py, weknora_mcp_server.py server_version, main.py --version),
|
||||
# __init__.py, academy_mcp_server.py server_version, main.py --version),
|
||||
# merge to main, and the pipeline builds + publishes automatically.
|
||||
# A pre-publish check queries PyPI and skips upload if that version is
|
||||
# already published, so re-running on an unchanged version stays green.
|
||||
@@ -105,7 +105,7 @@ jobs:
|
||||
id-token: write
|
||||
environment:
|
||||
name: pypi
|
||||
url: https://pypi.org/project/tencent-weknora-mcp/
|
||||
url: https://pypi.org/project/tencent-academy-mcp/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -123,7 +123,7 @@ jobs:
|
||||
import json, sys, urllib.request
|
||||
v = sys.argv[1]
|
||||
try:
|
||||
d = json.load(urllib.request.urlopen("https://pypi.org/pypi/tencent-weknora-mcp/json"))
|
||||
d = json.load(urllib.request.urlopen("https://pypi.org/pypi/tencent-academy-mcp/json"))
|
||||
print("true" if v in d.get("releases", {}) else "false")
|
||||
except Exception:
|
||||
# If PyPI is unreachable or the project is brand-new (404), treat as unpublished.
|
||||
@@ -132,7 +132,7 @@ jobs:
|
||||
echo "already on PyPI: $exists"
|
||||
if [ "$exists" = "true" ]; then
|
||||
echo "should_publish=false" >> "$GITHUB_OUTPUT"
|
||||
echo "::warning::tencent-weknora-mcp $version is already on PyPI; skipping publish. Bump pyproject.toml (and synced version strings) to release new changes."
|
||||
echo "::warning::tencent-academy-mcp $version is already on PyPI; skipping publish. Bump pyproject.toml (and synced version strings) to release new changes."
|
||||
else
|
||||
echo "should_publish=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
@@ -103,13 +103,13 @@ jobs:
|
||||
export CGO_LDFLAGS="-Wl,-no_warn_duplicate_libraries"
|
||||
fi
|
||||
go build -tags "sqlite_fts5" -ldflags="${LDFLAGS}" \
|
||||
-o WeKnora-lite ./cmd/server
|
||||
-o Academy-lite ./cmd/server
|
||||
|
||||
- name: Package tarball
|
||||
run: |
|
||||
ARCHIVE="WeKnora-lite_${{ steps.ver.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}"
|
||||
ARCHIVE="Academy-lite_${{ steps.ver.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}"
|
||||
mkdir -p "${ARCHIVE}/web"
|
||||
cp WeKnora-lite "${ARCHIVE}/"
|
||||
cp Academy-lite "${ARCHIVE}/"
|
||||
bash ./scripts/copy-licenses.sh "${ARCHIVE}"
|
||||
cp -r web/* "${ARCHIVE}/web/"
|
||||
cp .env.lite.example "${ARCHIVE}/"
|
||||
@@ -121,8 +121,8 @@ jobs:
|
||||
mkdir -p "${ARCHIVE}/migrations/sqlite"
|
||||
cp -r migrations/sqlite/* "${ARCHIVE}/migrations/sqlite/"
|
||||
fi
|
||||
if [ -f deploy/weknora-lite.service ]; then
|
||||
cp deploy/weknora-lite.service "${ARCHIVE}/"
|
||||
if [ -f deploy/academy-lite.service ]; then
|
||||
cp deploy/academy-lite.service "${ARCHIVE}/"
|
||||
fi
|
||||
tar czf "${ARCHIVE}.tar.gz" "${ARCHIVE}"
|
||||
shasum -a 256 "${ARCHIVE}.tar.gz" > "${ARCHIVE}.tar.gz.sha256"
|
||||
@@ -131,8 +131,8 @@ jobs:
|
||||
with:
|
||||
name: release-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||
path: |
|
||||
WeKnora-lite_*.tar.gz
|
||||
WeKnora-lite_*.tar.gz.sha256
|
||||
Academy-lite_*.tar.gz
|
||||
Academy-lite_*.tar.gz.sha256
|
||||
retention-days: 3
|
||||
|
||||
# ── 2b. Build Desktop APP per platform (Wails) ──
|
||||
@@ -241,13 +241,13 @@ jobs:
|
||||
-platform "${{ matrix.platform }}" \
|
||||
${NSIS_FLAG} \
|
||||
-ldflags="${LDFLAGS}" \
|
||||
-o "WeKnora Lite"
|
||||
-o "Academy Lite"
|
||||
|
||||
# ── macOS: bundle .app with resources, then create DMG ──
|
||||
- name: Package macOS app
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
APP_BUNDLE="WeKnora Lite.app"
|
||||
APP_BUNDLE="Academy Lite.app"
|
||||
SRC="cmd/desktop/build/bin/${APP_BUNDLE}"
|
||||
RESOURCES="${SRC}/Contents/Resources"
|
||||
|
||||
@@ -265,14 +265,14 @@ jobs:
|
||||
cp -r config/* "${RESOURCES}/config/"
|
||||
fi
|
||||
|
||||
DMG_NAME="WeKnora-Lite-App_${{ steps.ver.outputs.version }}_${{ matrix.arch_label }}"
|
||||
DMG_NAME="Academy-Lite-App_${{ steps.ver.outputs.version }}_${{ matrix.arch_label }}"
|
||||
|
||||
DMG_SRC="dmg_staging"
|
||||
mkdir -p "${DMG_SRC}"
|
||||
cp -R "cmd/desktop/build/bin/${APP_BUNDLE}" "${DMG_SRC}/"
|
||||
ln -s /Applications "${DMG_SRC}/Applications"
|
||||
|
||||
hdiutil create -volname "WeKnora Lite" \
|
||||
hdiutil create -volname "Academy Lite" \
|
||||
-srcfolder "${DMG_SRC}" \
|
||||
-ov -format UDZO \
|
||||
"${DMG_NAME}.dmg"
|
||||
@@ -283,9 +283,9 @@ jobs:
|
||||
- name: Package Linux app
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
ARCHIVE="WeKnora-Lite-App_${{ steps.ver.outputs.version }}_${{ matrix.arch_label }}"
|
||||
ARCHIVE="Academy-Lite-App_${{ steps.ver.outputs.version }}_${{ matrix.arch_label }}"
|
||||
mkdir -p "${ARCHIVE}"
|
||||
cp "cmd/desktop/build/bin/WeKnora Lite" "${ARCHIVE}/"
|
||||
cp "cmd/desktop/build/bin/Academy Lite" "${ARCHIVE}/"
|
||||
bash ./scripts/copy-licenses.sh "${ARCHIVE}"
|
||||
if [ -f .env.lite.example ]; then
|
||||
cp .env.lite.example "${ARCHIVE}/"
|
||||
@@ -306,8 +306,8 @@ jobs:
|
||||
if: runner.os == 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
ARCHIVE="WeKnora-Lite-App_${{ steps.ver.outputs.version }}_${{ matrix.arch_label }}"
|
||||
INSTALLER="cmd/desktop/build/bin/WeKnora Lite-amd64-installer.exe"
|
||||
ARCHIVE="Academy-Lite-App_${{ steps.ver.outputs.version }}_${{ matrix.arch_label }}"
|
||||
INSTALLER="cmd/desktop/build/bin/Academy Lite-amd64-installer.exe"
|
||||
# Do not publish a bare executable if NSIS was unavailable: the
|
||||
# installer also carries the notices/source and supports auto-update.
|
||||
test -f "$INSTALLER"
|
||||
@@ -318,7 +318,7 @@ jobs:
|
||||
with:
|
||||
name: ${{ matrix.artifact_name }}
|
||||
path: |
|
||||
WeKnora-Lite-App_*
|
||||
Academy-Lite-App_*
|
||||
retention-days: 3
|
||||
|
||||
# ── 3. Create GitHub Release ──
|
||||
@@ -352,7 +352,7 @@ jobs:
|
||||
id: notes
|
||||
run: |
|
||||
cat > notes.md << 'NOTES'
|
||||
## WeKnora Lite ${{ steps.ver.outputs.version }}
|
||||
## Academy Lite ${{ steps.ver.outputs.version }}
|
||||
|
||||
### Web CLI 版(命令行 / 服务器部署)
|
||||
|
||||
@@ -360,8 +360,8 @@ jobs:
|
||||
|
||||
```bash
|
||||
# 1. 解压
|
||||
tar xzf WeKnora-lite_${{ steps.ver.outputs.version }}_<os>_<arch>.tar.gz
|
||||
cd WeKnora-lite_${{ steps.ver.outputs.version }}_<os>_<arch>
|
||||
tar xzf Academy-lite_${{ steps.ver.outputs.version }}_<os>_<arch>.tar.gz
|
||||
cd Academy-lite_${{ steps.ver.outputs.version }}_<os>_<arch>
|
||||
|
||||
# 2. 配置
|
||||
cp .env.lite.example .env.lite
|
||||
@@ -374,16 +374,16 @@ jobs:
|
||||
|
||||
# 4. 运行
|
||||
set -a && source .env.lite && set +a
|
||||
./WeKnora-lite
|
||||
./Academy-lite
|
||||
# 访问 http://localhost:8080
|
||||
```
|
||||
|
||||
| 文件 | 平台 |
|
||||
|------|------|
|
||||
| `WeKnora-lite_*_linux_amd64.tar.gz` | Linux x86_64 |
|
||||
| `WeKnora-lite_*_linux_arm64.tar.gz` | Linux ARM64 |
|
||||
| `WeKnora-lite_*_darwin_amd64.tar.gz` | macOS Intel |
|
||||
| `WeKnora-lite_*_darwin_arm64.tar.gz` | macOS Apple Silicon |
|
||||
| `Academy-lite_*_linux_amd64.tar.gz` | Linux x86_64 |
|
||||
| `Academy-lite_*_linux_arm64.tar.gz` | Linux ARM64 |
|
||||
| `Academy-lite_*_darwin_amd64.tar.gz` | macOS Intel |
|
||||
| `Academy-lite_*_darwin_arm64.tar.gz` | macOS Apple Silicon |
|
||||
|
||||
---
|
||||
|
||||
@@ -393,11 +393,11 @@ jobs:
|
||||
|
||||
| 文件 | 平台 |
|
||||
|------|------|
|
||||
| `WeKnora-Lite-App_*_macOS_universal.dmg` | macOS (Intel + Apple Silicon) |
|
||||
| `WeKnora-Lite-App_*_macOS_amd64.dmg` | macOS Intel |
|
||||
| `WeKnora-Lite-App_*_macOS_arm64.dmg` | macOS Apple Silicon |
|
||||
| `WeKnora-Lite-App_*_linux_amd64.tar.gz` | Linux x86_64 |
|
||||
| `WeKnora-Lite-App_*_windows_amd64_setup.exe` | Windows x86_64 (安装包) |
|
||||
| `Academy-Lite-App_*_macOS_universal.dmg` | macOS (Intel + Apple Silicon) |
|
||||
| `Academy-Lite-App_*_macOS_amd64.dmg` | macOS Intel |
|
||||
| `Academy-Lite-App_*_macOS_arm64.dmg` | macOS Apple Silicon |
|
||||
| `Academy-Lite-App_*_linux_amd64.tar.gz` | Linux x86_64 |
|
||||
| `Academy-Lite-App_*_windows_amd64_setup.exe` | Windows x86_64 (安装包) |
|
||||
|
||||
详细文档见 [LITE.md](docs/LITE.md)。
|
||||
NOTES
|
||||
@@ -407,11 +407,11 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh release create "${{ steps.ver.outputs.version }}" \
|
||||
--title "WeKnora Lite ${{ steps.ver.outputs.version }}" \
|
||||
--title "Academy Lite ${{ steps.ver.outputs.version }}" \
|
||||
--notes-file notes.md \
|
||||
WeKnora-lite_*.tar.gz \
|
||||
WeKnora-lite_*.tar.gz.sha256 \
|
||||
WeKnora-Lite-App_* || true
|
||||
Academy-lite_*.tar.gz \
|
||||
Academy-lite_*.tar.gz.sha256 \
|
||||
Academy-Lite-App_* || true
|
||||
|
||||
# ── 4. Update Homebrew Formula ──
|
||||
update-homebrew:
|
||||
@@ -443,10 +443,10 @@ jobs:
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add Formula/weknora-lite.rb
|
||||
git add Formula/academy-lite.rb
|
||||
if git diff --cached --quiet; then
|
||||
echo "No changes to Formula"
|
||||
else
|
||||
git commit -m "formula: update weknora-lite to ${{ steps.ver.outputs.version }}"
|
||||
git commit -m "formula: update academy-lite to ${{ steps.ver.outputs.version }}"
|
||||
git push origin main
|
||||
fi
|
||||
Reference in new issue
Block a user