From 791e359199a4c709b3631e4c8a7dd0b799197fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Tue, 27 Jan 2026 12:59:18 +0800 Subject: [PATCH 1/2] Update documentation links in README Replaced outdated Server.Other and NapCat.Wiki links with updated napcat.top URLs and labels in the documentation section of the README. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8245abf2..e5dda362 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ _Modern protocol-side framework implemented based on NTQQ._ | Docs | [![Github.IO](https://img.shields.io/badge/docs%20on-Github.IO-orange)](https://napneko.github.io/) | [![Cloudflare.Worker](https://img.shields.io/badge/docs%20on-Cloudflare.Worker-black)](https://doc.napneko.icu/) | [![Cloudflare.HKServer](https://img.shields.io/badge/docs%20on-Cloudflare.HKServer-informational)](https://napcat.napneko.icu/) | |:-:|:-:|:-:|:-:| -| Docs | [![Cloudflare.Pages](https://img.shields.io/badge/docs%20on-Cloudflare.Pages-blue)](https://napneko.pages.dev/) | [![Server.Other](https://img.shields.io/badge/docs%20on-Server.Other-green)](https://napcat.cyou/) | [![NapCat.Wiki](https://img.shields.io/badge/docs%20on-NapCat.Wiki-red)](https://www.napcat.wiki) | +| Docs | [![Cloudflare.Pages](https://img.shields.io/badge/docs%20on-Cloudflare.Pages-blue)](https://napneko.pages.dev/) | [![Server.Other](https://img.shields.io/badge/docs%20on-Server.Other-green)](https://napcat.top/) | [![NapCat.Top](https://img.shields.io/badge/docs%20on-NapCat.Top-red)](https://napcat.top/) | |:-:|:-:|:-:|:-:| | QQ Group | [![QQ Group#4](https://img.shields.io/badge/QQ%20Group%234-Join-blue)](https://qm.qq.com/q/CMmPbGw0jA) | [![QQ Group#3](https://img.shields.io/badge/QQ%20Group%233-Join-blue)](https://qm.qq.com/q/8zJMLjqy2Y) | [![QQ Group#2](https://img.shields.io/badge/QQ%20Group%232-Join-blue)](https://qm.qq.com/q/CMmPbGw0jA) | [![QQ Group#1](https://img.shields.io/badge/QQ%20Group%231-Join-blue)](https://qm.qq.com/q/I6LU87a0Yq) | From d251e11c2170e3cd3766cd3ae9ff22425ec3d9ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Tue, 27 Jan 2026 13:22:29 +0800 Subject: [PATCH 2/2] Add workflow to publish OpenAPI schema to NapCatDocs Introduces a new 'publish-schema' job in the auto-release workflow. This job builds the napcat-schema package, copies the generated OpenAPI schema to the NapCatDocs repository under a versioned path, and commits the update. Automates schema publishing on release events. --- .github/workflows/auto-release.yml | 57 ++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 241fc19d..4358b4fc 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -5,6 +5,63 @@ on: types: [published] jobs: + publish-schema: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Get Version + id: get_version + run: | + latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1)) + version=${latest_tag#v} + echo "version=${version}" >> $GITHUB_ENV + echo "latest_tag=${latest_tag}" >> $GITHUB_ENV + echo "Debug: Version is ${version}" + + - name: Install Dependencies + run: pnpm install --frozen-lockfile + + - name: Build napcat-schema + run: | + cd packages/napcat-schema + pnpm run build:schema + + - name: Checkout NapCatDocs + uses: actions/checkout@v4 + with: + repository: NapNeko/NapCatDocs + token: ${{ secrets.NAPCAT_BUILD }} + path: napcat-docs + + - name: Copy OpenAPI Schema + run: | + mkdir -p napcat-docs/src/api/${{ env.version }} + cp packages/napcat-schema/openapi.json napcat-docs/src/api/${{ env.version }}/openapi.json + echo "OpenAPI schema copied to napcat-docs/src/api/${{ env.version }}/openapi.json" + + - name: Commit and Push + run: | + cd napcat-docs + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add src/api/${{ env.version }}/openapi.json + git commit -m "chore: update OpenAPI schema for version ${{ env.version }}" || echo "No changes to commit" + git push + shell-docker: runs-on: ubuntu-latest steps: