210 Commits
Author SHA1 Message Date
MliKiowa 98d781d198 docs: 修改要求
Updated bug report template to include new guidelines for submissions.

Signed-off-by: MliKiowa <nanaeonn@outlook.com>
2026-10-30 15:06:17 +08:00
手瓜一十雪 859eb530c5 fix(ci): avoid resolving dev dependencies in release artifacts 2026-10-21 16:36:48 +08:00
手瓜一十雪 6797143b04 chore(ci): remove one-off compatibility validation 2026-10-10 12:50:35 +08:00
手瓜一十雪 ff37736a4a docs(release): remove obsolete release note templates 2026-10-10 12:27:51 +08:00
手瓜一十雪 26ad589367 fix(release): generate notes from verified tag history 2026-10-10 12:27:51 +08:00
手瓜一十雪 ff9a829e29 fix(shell): preserve Windows launcher paths and elevation arguments 2026-10-10 11:17:31 +08:00
手瓜一十雪 f8786c65de test(macos): read XML entitlements and cache verified QQ image 2026-10-10 10:41:55 +08:00
手瓜一十雪 038dd558da test(macos): exercise signed QQ with native modules without login 2026-10-10 10:29:52 +08:00
手瓜一十雪 abda6a96de fix(native): complete cross-platform media and packet integration 2026-10-10 09:53:28 +08:00
手瓜一十雪 1c0f7cce4f fix(macos): support verified QQ builds on arm64 and x64 2026-10-10 01:05:09 +08:00
手瓜一十雪 ec6aadaeea fix(shell): support QQ 9.9.36 Windows file query aliases 2026-10-07 00:07:42 +08:00
手瓜一十雪 9109b8cfe2 fix: repair Windows release dependencies and loader paths
Bundle required crypto and SSL DLLs and gate releases on a Windows native-load smoke test. Resolve loader paths independently of the working directory and encode file URLs correctly. Include the quick-login launcher built from Windows-Boot 0ff70ce10e34ac26411f9e6bcedaedfacc1e74f0. Validated builds, five path regressions, and live Shell and Windows Node startup to QR login.
2026-10-06 17:51:21 +08:00
sj817 454cc0eda2 ci(release): 下游 AppImage 用的 QQ 换成 3.2.32-52194
原来的 3.2.30-50969 链接已经 404,v4.18.29 发版时 AppImage、NodeLoader 的构建都因此失败。
2026-10-05 13:50:01 +08:00
sj817 c0fd089539 chore(release): 发布说明换成仍可下载的 QQ 官方 CDN 链接
原来的 9.9.26-44343 / 3.2.23-44343 / Mac 40990 链接已经全部 404。
换成 Windows 9.9.33-52230 和 Linux 3.2.32-52194 的官方 CDN 链接并标注,
附上 GitHub 镜像作为备用,MacOS 写明暂不支持。
2026-10-05 12:45:34 +08:00
手瓜一十雪 7a35ef035a Pin Windows QQ package for release build
The Windows release workflow now uses a fixed QQ installer URL and SHA256 hash, verifies the downloaded installer before packaging, and makes the download cache key sensitive to the selected QQ URL, hash, and Node version. The workflow also switches QQ downloads to curl with retries for transient HTTP errors and centralizes the Node version variable to keep the build config consistent.
2026-09-14 12:01:24 +08:00
手瓜一十雪 fa3fe9fdb2 Use pnpm setup in release workflow
The release publishing workflow now installs pnpm via pnpm/action-setup instead of globally via npm, and applies the same improvement to the APIFox update job. This keeps the workflow consistent and avoids relying on the environment's global pnpm installation.
2026-09-14 11:43:29 +08:00
手瓜一十雪 766ca6e071 Update QQNT release download URLs
Refresh the downstream release workflow to use the newer QQNT 3.2.30-50969 AppImage URLs for both x86_64 and arm64 builds.

Update release note prompt and AI model

Clarifies the release note prompt to require strict output format without wrapping the result in a code block. Also updates the release publish workflow to use `google/gemma-4-26b-a4b-it:free` instead of the previous OpenAI model endpoint setting.

Update QQNT installer URL in release workflow

Switches the release publish workflow to download a newer QQNT x64 installer (9.9.32.50969) from the updated qqdl.gtimg.cn source instead of the previous dldir1v6.qq.com link.

Add mappings for QQ 50969 builds

Add appid/QUA entries and native/packet send-recv offsets for the new 9.9.32-50969 Windows build and 3.2.30-50969 Linux x64/arm64 builds. Also normalize the existing 3.2.30-50828 x64 native recv offset format by removing the leading zero.
2026-08-07 17:46:36 +08:00
liuwanwan 0af6445d5a fix: 修复 lint 校验失败 (#1867) 2026-05-28 14:14:50 +08:00
手瓜一十雪 f226c83595 Skip pnpm install scripts; defer QR code fetch & fix #1804
CI: use `pnpm i --ignore-scripts` in release-publish workflow to avoid running package install scripts during CI.

Shell: defer showing the QR code until after attempting WebUi quick-login/password fallback. Adds checks for NAPCAT_QUICK_ACCOUNT and quick-password env vars (and WebUi quick-login list), runs WebUi quick config, and only calls getQRCodePicture() if no fallback was attempted and the user is not logged in. Includes error handling for the quick-login attempt.
2026-05-22 22:23:45 +08:00
手瓜一十雪 b058604077 PR build: add dispatch script & secure workflow
Introduce a safe PR build dispatch flow and related helpers.

- Add GitHubAPI.createWorkflowDispatch to .github/scripts/lib/github.ts and tighten getRepository nullability.
- Add .github/scripts/pr-build-dispatch.ts to dispatch an untrusted workflow_run (workflow_dispatch) for PR builds.
- Rewrite .github/workflows/build-pr.yml to split privileged checks (pull_request_target / issue_comment) from untrusted execution (workflow_dispatch):
  - Add workflow_dispatch inputs for PR metadata.
  - Ensure privileged jobs only check conditions, post comments and dispatch the untrusted build.
  - Untrusted build jobs (framework/shell/publish) run under workflow_dispatch, checkout PR code into a separate workspace, clear GITHUB_TOKEN in build steps, and set stricter permissions and persist-credentials:false where appropriate.
  - Adjust concurrency, outputs, and inter-job dependencies to work with inputs rather than passing sensitive data between privileged and untrusted contexts.
- Update trigger-docker and result-comment flows to rely on workflow_dispatch inputs and only run in the untrusted run where appropriate.

- Change packages/napcat-vite/vite-plugin-version.js to read NAPCAT_GITHUB_TOKEN (instead of GITHUB_TOKEN) to avoid exposing Actions write tokens in untrusted builds.

These changes aim to improve security by preventing execution of PR-controlled code with elevated repo permissions and by isolating token usage.
2026-05-19 15:52:47 +08:00
时瑾 285ba9cf2d ci: pin pnpm to v9 via pnpm/action-setup
pnpm 10 exits non-zero on [ERR_PNPM_IGNORED_BUILDS] by default, which
broke CI after the global pnpm version on GitHub runners bumped.

Replace ad-hoc `npm i -g pnpm` calls with pnpm/action-setup@v4 pinned to
version 9 across build-ci.yml, build-pr.yml, and drop the redundant
Install pnpm step from pr-build-run.ts.
2026-05-16 14:07:11 +08:00
时瑾 600f2a4518 fix: replace nclatest proxy with ghfast.top, add dual install commands 2026-04-18 01:29:58 +08:00
时瑾 abf57e688c feat: add proxy prefix to install URL, change TTL to 5 days
- comment.ts: Add PROXY_BASE constant (https://nclatest.znin.net);
  install curl command now uses proxy URL for CN users;
  '24小时' -> '5天'; Docker '7天' -> '5天'
- pr-publish-release.ts: Import PROXY_BASE, use proxy URL in release body,
  '24小时' -> '5天'
2026-04-18 00:31:40 +08:00
时瑾 d92a4cff8d fix: zip absolute path, publish failure comment, pass publish_status
- pr-publish-release.ts: Use resolve() for releaseDir to get absolute path;
  zip command runs with cwd=artifactDir so relative path was resolving wrong
- build-pr.yml: Expose steps.publish.outcome as publish_status job output;
  pass PUBLISH_STATUS env to update-comment-result job
- pr-build-result.ts: Read PUBLISH_STATUS, pass publishFailed to comment
- comment.ts: Show '⚠️ Release 发布失败' section in PR comment when
  publish failed but installInfo is absent
2026-04-18 00:18:46 +08:00
时瑾 e195aee5d2 fix: remove TS overloads incompatible with --experimental-strip-types, fix 204 response, fix retention-days
- lib/github.ts: Remove getEnv overload signatures (Node.js experimental-strip-types
  does not support TS function overloads, causes SyntaxError at parse time)
- lib/github.ts: Handle 204 No Content in request<T> (DELETE returns 204,
  calling response.json() on empty body throws)
- build-pr.yml: retention-days 7->5 (repo max is 5)
2026-04-18 00:08:12 +08:00
时瑾 014a32533d feat: add PR release publish, Docker dispatch and comment system 2026-04-17 23:51:30 +08:00
手瓜一十雪 c5bc48da1f Remove NAPCAT_BUILD token from workflow
Remove the explicit `token: ${{ secrets.NAPCAT_BUILD }}` line from the release-publish GitHub Actions workflow. This stops passing the custom NAPCAT_BUILD secret to the release step, allowing the action to use the default authentication mechanism or another configured token and reducing exposure of the custom secret.
2026-04-05 20:31:17 +08:00
手瓜一十雪 10f961c552 Update OPENAI_MODEL in release workflow
Change the OPENAI_MODEL environment variable in .github/workflows/release-publish.yml from "openrouter/hunter-alpha" to "z-ai/glm-4.5-air:free" so the release-publish job uses the new model endpoint for OpenAI API calls. No other workflow changes.
2026-03-22 15:19:40 +08:00
手瓜一十雪 c7109e20ad Use GITHUB_TOKEN for downstream trigger
Replace secrets.NAPCAT_BUILD with the built-in secrets.GITHUB_TOKEN in the release-publish workflow to authenticate triggering downstream release workflows. This removes dependency on a custom secret and uses the repo-scoped Actions token for simpler, more secure automation.
2026-03-14 12:51:00 +08:00
手瓜一十雪 d61433f2a4 Update OPENAI_MODEL in release workflow
Update the OPENAI_MODEL env var in .github/workflows/release-publish.yml from "stepfun/step-3.5-flash:free" to "openrouter/hunter-alpha" so the release publish job uses the new model for API calls. No other workflow changes.
2026-03-13 22:58:03 +08:00
手瓜一十雪 59bd457a97 Refactor GitHub Actions workflows
Rework CI/CD by replacing and reorganizing GitHub Actions workflows. Added build-ci.yml (typecheck/test + matrix builds), release-downstream.yml (dispatch downstream releases), and release-tag.yml (tag validation + trigger). Renamed pr-build.yml → build-pr.yml and release.yml → release-publish.yml to use input-driven release flows. Removed deprecated workflows (auto-release.yml, build.yml) and deleted locale README files under docs (README_ar/ja/ko/ru/zh-CN/zh-TW). Changes include artifact matrix builds, caching and optimized Windows assembly steps, OpenAPI schema publishing to NapCatDocs, and explicit downstream workflow dispatching on release.
2026-03-13 19:22:00 +08:00
手瓜一十雪 df0795f2c5 Update GitHub Actions to newer versions
Upgrade workflow action versions across .github/workflows: actions/checkout@v4 -> @v5, actions/setup-node@v4 -> @v6, actions/upload-artifact@v4 -> @v6, and actions/download-artifact@v4 -> @v7. Changes touch auto-release.yml, build.yml, pr-build.yml, and release.yml to keep CI tooling current and compatible with newer runner features; also add a missing newline at end of auto-release.yml.
2026-03-12 14:04:00 +08:00
手瓜一十雪 974528fe7e Apply formatting and minor style fixes across repo
Normalize code style across multiple packages: whitespace cleanup, consistent commas and trailing commas in arrays/enums/objects, fix table markdown lines in CI comment template, ensure newline at EOF, normalize header/object property quoting and spacing, remove stray blank lines and minor non-functional comment tweaks. These are formatting-only changes and small type/annotation spacing adjustments; no functional behavior changes intended.
2026-03-05 18:45:50 +08:00
手瓜一十雪 776cc8cefd Use NAPCAT_BUILD secret for release
Switch the release workflow to use the NAPCAT_BUILD secret instead of the default GITHUB_TOKEN. This allows the release job to run with a dedicated token (e.g., with different scopes or credentials) when creating tags, changelogs, and uploading release artifacts.
2026-03-05 09:16:46 +08:00
手瓜一十雪 34a699c568 Remove Windows one-click package section
Delete the 'Windows 一键包' section from .github/prompt/default.md, removing the lightweight one-click deployment instructions, reference to NapCat.Shell.Windows.OneKey.zip, and related tutorial notes. Keeps the version header and warning section intact.
2026-03-04 22:22:58 +08:00
手瓜一十雪 2a06688479 Remove SHA512 debug log output
Remove console.log statements that printed the computed SHA512 hashes for the shell and framework in .github/scripts/publish-release-hash.mjs. This reduces log noise and prevents potentially sensitive hash values from appearing in CI logs while retaining the hash computation logic.
2026-03-04 21:59:00 +08:00
手瓜一十雪 976331af94 Use NAPCAT_BUILD secret in release workflow
Update .github/workflows/release.yml to set GH_TOKEN from secrets.NAPCAT_BUILD instead of secrets.GH_TOKEN when publishing the release hash. This switches the workflow to use the new/rotated secret name for release publishing.
2026-03-04 21:50:16 +08:00
手瓜一十雪 46b0532f84 Set up gh auth in release workflow
Invoke `gh auth setup-git` in the release GitHub Actions workflow before cloning the hash repo so git is configured to use the GitHub CLI authentication. This prevents authentication issues when running `gh repo clone` and subsequent git operations in CI.
2026-03-04 21:41:17 +08:00
手瓜一十雪 819f76afbf Use gh CLI to clone hash repo in workflow
In the release workflow, replace the token-based git clone URL with the GitHub CLI command. Removed the CLONE_URL variable and now run `gh repo clone NapNeko/napcat-release-hash hash-repo`, avoiding embedding GH_TOKEN in the clone URL and relying on gh authentication for a cleaner, more secure clone.
2026-03-04 21:38:32 +08:00
手瓜一十雪 d16f493136 Publish GitHub release instead of draft
Update the release workflow to publish releases immediately by setting the softprops/action-gh-release step's draft flag to false. Also adjust the step name to "Create Release and Upload Artifacts" to reflect the change so CI will create a published release and upload artifacts instead of leaving a draft.
2026-03-04 21:00:13 +08:00
手瓜一十雪 4c8419d5ab Add release hash script and NapCat file-hash UI
Add a new .github/scripts/publish-release-hash.mjs to compute SHA512 for Shell/Framework napcat.mjs, maintain a release.json (keep last 100 entries) and write it to a separate hash repo. Wire the script into .github/workflows/release.yml to clone NapNeko/napcat-release-hash and publish hashes on release. Backend: expose GET /base/GetNapCatFileHash to compute napcat.mjs SHA512. Frontend: add WebUIManager.GetNapCatFileHash and show a join-password snippet on About page by combining file hash and user UIN (hashed with CryptoJS); update About page links to QQ groups. Update README and localized docs to list community QQ groups. Error handling and basic logging added.
2026-03-04 20:57:53 +08:00
手瓜一十雪 7c2eacf0dc Switch release workflow to OpenAI endpoint
Update .github/workflows/release.yml to use the OpenRouter/OpenAI public endpoint and standardized env names. Replaced custom API URL and model with OPENAI_API_URL=https://openrouter.ai/api/v1/chat/completions and OPENAI_MODEL="stepfun/step-3.5-flash:free", renamed variables (OPENROUTER_* → OPENAI_*), adjusted the job step name and log messages, and updated the curl request and response handling to use the new env vars. Kept existing behavior for generating release notes and the fallback to the default template when the LLM output is empty.
2026-03-04 12:01:11 +08:00
手瓜一十雪 e09c3c1146 Upgrade release action to v2 and set tag_name
Update .github/workflows/release.yml to use softprops/action-gh-release@v2 and add the tag_name input mapped to github.ref_name so the created draft release uses the current ref as the release tag. Other release settings (name, token, body_path) are preserved.
2026-03-04 11:50:26 +08:00
手瓜一十雪 eb937b29e4 Enable native verbose logging via env var
Read NAPCAT_ENABLE_VERBOSE_LOG at startup and call napi2nativeLoader.nativeExports.setVerbose(true) (if available) right after loading the wrapper so native verbose logging can be enabled via environment. Also includes an updated native .node binary.
2026-02-13 19:33:48 +08:00
手瓜一十雪 c91e1378cf Increase OpenRouter max_tokens to 5000
Update .github/workflows/release.yml to raise the OpenRouter request max_tokens from 1500 to 5000. This allows the model to generate longer responses during the release workflow; be aware this may increase token usage and cost.
2026-02-13 18:01:36 +08:00
手瓜一十雪 f17abccfdc Cleanup orphaned Electron child processes
Add cleanupOrphanedProcesses to terminate leftover child processes when running in Electron. The function imports Electron at runtime, uses app.getAppMetrics() to enumerate processes, excludes the main and provided worker PIDs, and sends SIGTERM to stray PIDs while ignoring already-dead processes and API errors. Also invoke this cleanup in restartWorker after starting the new worker to avoid lingering processes after restarts. Includes @ts-ignore for the dynamic Electron import and debug logging on failure.
2026-02-13 15:45:05 +08:00
时瑾 beef1233fa fix(ci): 修复 Update apifox 步骤中因 OpenAPI 文件过大导致的参数列表过长错误 2026-02-07 13:44:25 +08:00
pohgxz 54266f97f8 fix: 尝试修复 Update apifox 错误 2026-02-05 22:47:02 +08:00
手瓜一十雪 f3e24811ad Simplify QQ/Node download in release workflow
Merge and simplify the QQ and Node.js download steps in .github/workflows/release.yml: remove the actions/cache step and related QQ cache logic, always download the QQ x64 installer directly, and assemble/extract using a single temporary directory (TMPDIR). Also rename the step to "Download and Assemble NapCat.Shell.Windows.Node.zip" and switch NODE_EXTRACT to use TMPDIR instead of WORK_TMPDIR. This reduces workflow complexity and avoids maintaining a local cache for the QQ installer.
2026-02-05 18:40:47 +08:00
pohgxz dc8b85da1c feat: 自动更新apifox 2026-02-05 12:56:53 +08:00