Skip to content

Fix slim Windows release packaging and update CI pnpm setup for Node 24#377

Merged
mcthesw merged 16 commits intodevfrom
copilot/fix-ci-build-issue
Apr 15, 2026
Merged

Fix slim Windows release packaging and update CI pnpm setup for Node 24#377
mcthesw merged 16 commits intodevfrom
copilot/fix-ci-build-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 13, 2026

  • Identify root cause: rgsm-core workspace dependency had default-features = true (implicit), so --no-default-features only disabled rgsm defaults but NOT rgsm-core/bundled-manifest
  • Fix workspace Cargo.toml to set default-features = false for rgsm-core
  • Verify normal build still includes rust-embed/bundled-manifest
  • Verify slim build (--no-default-features) excludes rust-embed entirely
  • Verify all workspace crates compile (rgsm, rgsm-cli, rgsm-ffi)
  • Run all pre-commit checks (clippy, tests, lint, typecheck)

Copilot AI changed the title [WIP] Fix CI build failure for slim version Fix slim Windows release packaging so CI fails correctly and uses the intended Tauri config Apr 13, 2026
Copilot AI requested a review from mcthesw April 13, 2026 15:46
@mcthesw
Copy link
Copy Markdown
Owner

mcthesw commented Apr 13, 2026

@copilot 另外也修复一下Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: pnpm/action-setup@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
这个问题吧

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 13, 2026

@copilot 另外也修复一下Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: pnpm/action-setup@v4. Actions will be forced to run with ...

已处理,相关 workflow 里的 pnpm/action-setup 都升级到 @v5,这样会走 Node 24 兼容版本,不再依赖已弃用的 Node 20 runtime。对应提交:895720a

Copilot AI changed the title Fix slim Windows release packaging so CI fails correctly and uses the intended Tauri config Fix slim Windows release packaging and update CI pnpm setup for Node 24 Apr 13, 2026
@mcthesw mcthesw marked this pull request as ready for review April 13, 2026 17:04
Copilot AI review requested due to automatic review settings April 13, 2026 17:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the slim Windows release packaging path by calling the Tauri CLI with a correctly-scoped --config argument and by ensuring portable packaging failures propagate as non-zero exit codes in CI. Also updates workflows to use a Node 24-compatible pnpm/action-setup version.

Changes:

  • Add a runPortableCli wrapper so scripts/portable.mjs exits non-zero on packaging errors, and add targeted unit tests.
  • Update GitHub Actions workflows to use pnpm/action-setup@v5 and normalize some YAML quoting.
  • Split slim Windows release into dedicated “build slim app” and “portable packaging” steps with the correct Tauri CLI invocation.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
scripts/portable.mjs Adds runPortableCli wrapper and uses it in CLI entrypoint to propagate failures via exit code.
scripts/portable.test.mjs Adds tests for the new CLI wrapper success/failure behavior.
.github/workflows/copilot-setup-steps.yml Updates pnpm setup action to @v5 and minor YAML formatting.
.github/workflows/code-test.yml Updates pnpm setup action to @v5 and minor YAML formatting.
.github/workflows/code-style.yml Updates pnpm setup action to @v5 and minor YAML formatting.
.github/workflows/build-gui.yml Fixes slim Windows build command (correct --config + Cargo arg forwarding) and separates slim build vs portable packaging steps; updates pnpm setup action to @v5.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 41 to 46
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: lts/*
cache: 'pnpm'
cache: "pnpm"

Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new scripts/portable.test.mjs coverage for runPortableCli does not appear to run anywhere in CI (no workflow or package script invokes node --test). Consider adding a step in this workflow (after pnpm install) to execute the Node test suite so regressions in the portable CLI wrapper are caught automatically.

Copilot uses AI. Check for mistakes.
@mcthesw
Copy link
Copy Markdown
Owner

mcthesw commented Apr 14, 2026

@copilot 当前问题:
首先,无法成功跑通ci流程

Run pnpm portable
  
> rgsm-gui@ portable D:\a\game-save-manager\game-save-manager\apps\rgsm-gui
> node ../../scripts/portable.mjs
[INFO]: create portable zip successfully
[INFO]: upload to  
RequestError [HttpError]
    at D:\a\game-save-manager\game-save-manager\node_modules\.pnpm\@octokit+request@8.4.1\node_modules\@octokit\request\dist-node\index.js:125:21
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
    at async resolvePortable (file:///D:/a/game-save-manager/game-save-manager/scripts/portable.mjs:130:3)
    at async runPortableCli (file:///D:/a/game-save-manager/game-save-manager/scripts/portable.mjs:143:5)
    at async file:///D:/a/game-save-manager/game-save-manager/scripts/portable.mjs:155:22 {
  status: 404,
  response: {
    url: 'https://uploads.github.com/repos/mcthesw/game-save-manager/releases/assets?name=RGSM_1.9.0_x64-portable-slim.zip&',
    status: 404,
    headers: {
      'content-length': '0',
      'content-security-policy': "default-src 'none'",
      date: 'Tue, 14 Apr 2026 17:05:06 GMT',
      'strict-transport-security': 'max-age=31557600',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-request-id': '9809:25C777:24C34F:2AD3F1:69DE73C2',
      'x-github-tenant': '',
      'x-xss-protection': '1; mode=block'
    },
    data: ''
  },
  request: {
    method: 'POST',
    url: 'https://uploads.github.com/repos/mcthesw/game-save-manager/releases//assets?name=RGSM_1.9.0_x64-portable-slim.zip&',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'octokit-core.js/5.2.0 Node.js/24',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: <Buffer 50 4b 03 04 14 00 00 08 08 00 a2 88 8e 5c 06 dc 89 09 51 a8 ce 00 00 52 e0 01 08 00 00 00 72 67 73 6d 2e 65 78 65 ec 7d 09 7c 14 45 f6 7f f7 24 93 0c ... 13543569 more bytes>,
    request: {
      agent: [Agent],
      fetch: [Function: proxyFetch],
      hook: [Function: bound bound register]
    }
  }
}
 ELIFECYCLE  Command failed with exit code 1.
Error: Process completed with exit code 1.

其次,应该给手动触发workflow加一个checkbox input选项,勾选是否输出windows便携版(在自动构建中始终构建)

Agent-Logs-Url: https://github.com/mcthesw/game-save-manager/sessions/d9c83df6-efbe-4bfa-9c2c-ce4f996c0ec8

Co-authored-by: mcthesw <61224072+mcthesw@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot April 15, 2026 11:27
Copilot AI requested review from Copilot and removed request for Copilot April 15, 2026 13:11
Copilot AI requested review from Copilot and removed request for Copilot April 15, 2026 14:10
Copilot AI requested review from Copilot and removed request for Copilot April 15, 2026 14:23
Copilot AI requested review from Copilot and removed request for Copilot April 15, 2026 15:06
Copilot AI requested review from Copilot and removed request for Copilot April 15, 2026 15:37
Copilot AI requested review from Copilot and removed request for Copilot April 15, 2026 16:05
@mcthesw mcthesw merged commit 6b26a68 into dev Apr 15, 2026
4 checks passed
@mcthesw mcthesw deleted the copilot/fix-ci-build-issue branch April 15, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[错误/BUG]精简版构建CI失败,且不会显示失败

3 participants