Skip to content

ci: 升级 actions 至 Node 24 运行时,消除 deprecation 警告 - #9

Merged
liuziyuan merged 1 commit into
mainfrom
ci/upgrade-actions-node24
Sep 7, 2026
Merged

ci: 升级 actions 至 Node 24 运行时,消除 deprecation 警告#9
liuziyuan merged 1 commit into
mainfrom
ci/upgrade-actions-node24

Conversation

@liuziyuan

Copy link
Copy Markdown
Owner

背景

publish workflow 日志出现 deprecation 警告:

Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4, actions/setup-node@v4, softprops/action-gh-release@v2

改动

Action 升级 用途
actions/checkout v4 → v7 ci.yml + publish.yml
actions/setup-node v4 → v7 ci.yml + publish.yml
softprops/action-gh-release v2 → v3 publish.yml 的 Release 步骤

兼容性核对(各 major 的 breaking changes vs 本项目用法)

  • checkout v5/v6/v7:v5 要求 runner ≥ 2.327.1(GitHub-hosted 已满足);v6 凭证改存独立文件(本项目不依赖);v7 阻止 pull_request_target checkout fork PR(本项目仅用 push/pull_request 触发)→ 无影响
  • setup-node v6/v7:v6 breaking 为"自动缓存仅限 npm"——本项目两个 workflow 均显式声明 cache: npm;v7 移除 dummy NODE_AUTH_TOKEN export——本项目在 publish step 显式提供 env → 无影响
  • action-gh-release v3:纯 Node 24 运行时迁移,tag_name/generate_release_notes 参数不变 → 无影响

发布影响

ci: 改动,不 bump version。合并后 publish workflow 的 version-check 发现 1.7.0 == npm 上的 1.7.0,会自动跳过发布(同时正好作为新版本 actions 的实跑验证)。

🤖 Generated with Claude Code

- actions/checkout v4 → v7
- actions/setup-node v4 → v7
- softprops/action-gh-release v2 → v3

三者均为 Node 20 运行时,已被 runner 强制跑在 Node 24 并告警。
已核对各 major 的 breaking changes,与本项目用法(checkout 裸用、
setup-node 显式 cache: npm、gh-release 的 tag_name/generate_release_notes)
均不冲突。纯 ci 改动,不 bump version。

Co-Authored-By: Claude Code <noreply@anthropic.com>
@liuziyuan
liuziyuan merged commit b950a9d into main Sep 7, 2026
1 check passed
@liuziyuan
liuziyuan deleted the ci/upgrade-actions-node24 branch September 7, 2026 06:28
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.

1 participant