huacnlee / autocorrect

A linter and formatter to help you to improve copywriting, correct spaces, words, and punctuations between CJK (Chinese, Japanese, Korean).
https://huacnlee.github.io/autocorrect
MIT License
929 stars 34 forks source link

Release NPM 的 CI 需要更新参数以兼容目前的 macos-14 #191

Closed ykla closed 6 months ago

ykla commented 6 months ago

目前的问题:

root@ykla-virtual-machine:~# uname -ra
Linux ykla-virtual-machine 5.15.0-105-generic #115~20.04.1-Ubuntu SMP Mon Apr 15 17:33:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
root@ykla-virtual-machine:~# yarn add autocorrect-node 
yarn add v1.22.19
info No lockfile found.
[1/4] Resolving packages...
Couldn't find any versions for "autocorrect-node-darwin-x64" that matches "2.9.1"
? Please choose a version of "autocorrect-node-darwin-x64" from this list: (Use arrow keys)
❯ 2.9.0 
  2.8.4 
  2.8.3 
  2.8.2 
  2.8.1 
  2.8.0 
  2.7.2 
  2.7.1 
  2.7.0 
  2.6.2 
  2.6.1 
  2.6.0 
  2.5.8 
  2.5.5 
  2.5.3 
  2.5.2 
  2.5.1 
  2.5.0 
  2.4.3 
  2.4.0 
  2.3.2 
  2.3.1 
  2.3.0 
  2.2.0 
  2.1.1

经过搜索,应该和 https://github.com/yisibl/resvg-js/pull/320 是一个问题。

现在的 CI 参数是 macos-latest,已经指向了 macOS 14 Arm64。

          - host: macos-latest
            target: x86_64-apple-darwin

参考日志输出:https://github.com/huacnlee/autocorrect/actions/runs/8984303050/job/24675863335

2024-05-07T11:14:50.469Z napi:build Platform: darwin
2024-05-07T11:14:50.470Z napi:build Platform name: .darwin-arm64
2024-05-07T11:14:50.470Z napi:build Write binary content to [autocorrect-node.darwin-arm64.node]

实际上生成了 autocorrect-node.darwin-arm64.node 而非 x64。

所以 NPM 的 release CI 可能需要加参数 --target x86_64-apple-darwin。我不会矩阵,而且不知道为什么这个项目的 Github action 默认就是一直在报错,无法通过 https://rhysd.github.io/actionlint/ 语法验证。麻烦您加参数跑一下看看。

see also https://github.com/actions/runner-images/issues/9741. 或者可能把系统换成 macos-14-large……

huacnlee commented 6 months ago

谢谢提醒,已修复,@ykla 你试试我新打包的 v2.9.2