create-dwy 0.14.7 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/bin/index.js +8 -2
  3. package/package.json +1 -1
  4. package/src/skills-install.js +154 -0
  5. package/src/sync-all.js +7 -0
  6. package/templates/ai-tools/CLAUDE.md +28 -1
  7. package/templates/ai-tools/hooks/Git/pre-git-commit-sensitive-check.sh +10 -2
  8. package/templates/ai-tools/rules/Android/dwy-android-pitfalls.md +52 -0
  9. package/templates/ai-tools/rules/HarmonyOS/dwy-arkts-strict.md +221 -0
  10. package/templates/ai-tools/rules/HarmonyOS/dwy-arkts-ui-build.md +193 -0
  11. package/templates/ai-tools/rules/Python/dwy-python-backend.md +16 -63
  12. package/templates/ai-tools/rules/Python/dwy-python-base-lib.md +89 -0
  13. package/templates/ai-tools/rules/Python/dwy-python-pitfalls.md +49 -0
  14. package/templates/ai-tools/rules/Vue/dwy-vue-base-lib.md +127 -0
  15. package/templates/ai-tools/rules/Vue/dwy-vue-core.md +22 -86
  16. package/templates/ai-tools/rules/Vue/dwy-vue-pitfalls.md +66 -0
  17. package/templates/ai-tools/rules/iOS/dwy-ios-pitfalls.md +159 -0
  18. package/templates/ai-tools/rules/iOS/dwy-swift-core.md +35 -0
  19. package/templates/ai-tools/rules//345/274/200/345/217/221/346/265/201/347/250/213/dwy-dependency-freshness.md +59 -0
  20. package/templates/ai-tools/rules//345/274/200/345/217/221/346/265/201/347/250/213/dwy-tdd-development.md +47 -2
  21. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-acceptance/SKILL.md +24 -0
  22. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-architecture/SKILL.md +70 -0
  23. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-commercial/SKILL.md +58 -0
  24. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-competitor/SKILL.md +23 -0
  25. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-explore/SKILL.md +83 -0
  26. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-mvp/SKILL.md +24 -0
  27. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-poc/SKILL.md +24 -0
  28. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-prd/SKILL.md +23 -0
  29. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-product-launcher/SKILL.md +73 -0
  30. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-product-launcher/references/state-and-contract.md +155 -0
  31. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-prototype/SKILL.md +42 -0
  32. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-release/SKILL.md +27 -0
  33. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-stage-design/SKILL.md +30 -0
  34. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-stage-dev/SKILL.md +54 -0
  35. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-stage-launch/SKILL.md +37 -0
  36. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-stage-prd/SKILL.md +31 -0
  37. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-stage-ship/SKILL.md +30 -0
  38. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-tasks/SKILL.md +32 -0
  39. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-tdd-dev/SKILL.md +34 -0
  40. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-validate/SKILL.md +29 -0
  41. package/templates/ai-tools/skills//344/272/247/345/223/2010/345/210/2601/dwy-version/SKILL.md +24 -0
  42. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-github-action-publish/SKILL.md +365 -0
  43. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-github-action-publish/references/electron-release-workflow-template.yml +98 -0
  44. package/templates/ai-tools/skills//{350/277/220/347/273/264/345/217/221/345/270/203/dwy-cibuildwheel → 345/217/221/345/270/203/345/217/221/347/211/210/dwy-github-action-publish}/references/release-workflow-template.yml +3 -3
  45. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/SKILL.md +31 -0
  46. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/android.md +31 -0
  47. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/backend-deploy.md +23 -0
  48. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/changelog.md +37 -0
  49. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/frontend-deploy.md +23 -0
  50. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/generic-release.md +27 -0
  51. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/harmony.md +25 -0
  52. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/ios.md +32 -0
  53. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/monitor-notify.md +36 -0
  54. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/publish-config.md +65 -0
  55. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/version-sync.md +30 -0
  56. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/scripts/release_config.sh +115 -0
  57. package/templates/ai-tools/skills//345/{256/211/345/205/250 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-sdk-spec/SKILL.md +31 -21
  58. package/templates/ai-tools/skills//345/{256/211/345/205/250 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-sdk-spec/references/python-commercial-guide.md +1 -1
  59. package/templates/ai-tools/skills//345/{256/211/345/205/250 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-sdk-spec/references/sensitive-patterns.md +1 -1
  60. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-sdk-spec/scripts/init_config.sh +91 -0
  61. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-whiteboard-prototype/SKILL.md +70 -0
  62. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-whiteboard-prototype/assets/template.html +353 -0
  63. package/templates/ai-tools/skills//345/256/211/345/205/250/dwy-sdk-spec/scripts/init_config.sh +0 -97
  64. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-0to1/SKILL.md +0 -113
  65. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-0to1/templates/STATE.md +0 -56
  66. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-dev-qa/SKILL.md +0 -117
  67. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-market-analysis/SKILL.md +0 -92
  68. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-prd-coarse/SKILL.md +0 -72
  69. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-prd-coarse/templates/prd-coarse.md +0 -61
  70. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-prd-detailed/SKILL.md +0 -76
  71. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-prd-detailed/templates/prd-detailed.md +0 -119
  72. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-prototype/SKILL.md +0 -104
  73. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-publish/SKILL.md +0 -50
  74. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-publish/references/application-release.md +0 -106
  75. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-publish/references/sdk-release.md +0 -93
  76. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-spike/SKILL.md +0 -81
  77. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-tdd-dev/SKILL.md +0 -212
  78. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-tdd-dev/templates/impl-plan.md +0 -115
  79. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-tech-feasibility/SKILL.md +0 -105
  80. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-version-plan/SKILL.md +0 -64
  81. package/templates/ai-tools/skills//345/274/200/345/217/221/346/265/201/347/250/213/dwy-version-plan/templates/version-plan.md +0 -72
  82. package/templates/ai-tools/skills//350/277/220/347/273/264/345/217/221/345/270/203/dwy-cibuildwheel/SKILL.md +0 -356
  83. /package/templates/ai-tools/skills//345/{256/211/345/205/250 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-sdk-spec/assets/files-whitelist-snippet.json" +0 -0
  84. /package/templates/ai-tools/skills//345/{256/211/345/205/250 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-sdk-spec/assets/js-commercial.npmignore" +0 -0
  85. /package/templates/ai-tools/skills//345/{256/211/345/205/250 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-sdk-spec/assets/python-commercial-MANIFEST.in" +0 -0
  86. /package/templates/ai-tools/skills//345/{256/211/345/205/250 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-sdk-spec/assets/python-commercial.gitignore" +0 -0
  87. /package/templates/ai-tools/skills//345/{256/211/345/205/250 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-sdk-spec/references/js-commercial-guide.md" +0 -0
  88. /package/templates/ai-tools/skills//345/{256/211/345/205/250 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-sdk-spec/references/publish-blacklist.md" +0 -0
  89. /package/templates/ai-tools/skills//345/{256/211/345/205/250 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-sdk-spec/scripts/check_comments.py" +0 -0
  90. /package/templates/ai-tools/skills//345/{256/211/345/205/250 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-sdk-spec/scripts/check_js_publish.sh" +0 -0
  91. /package/templates/ai-tools/skills//345/{256/211/345/205/250 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-sdk-spec/scripts/check_python_publish.sh" +0 -0
  92. /package/templates/ai-tools/skills//345/{256/211/345/205/250 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-sdk-spec/scripts/detect_sdk.sh" +0 -0
  93. /package/templates/ai-tools/skills//345/{274/200/345/217/221/346/265/201/347/250/213 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-semver/SKILL.md" +0 -0
  94. /package/templates/ai-tools/skills//345/{274/200/345/217/221/346/265/201/347/250/213 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-semver/references/semver-spec.md" +0 -0
  95. /package/templates/ai-tools/skills//345/{274/200/345/217/221/346/265/201/347/250/213 → 217/221/345/270/203/345/217/221/347/211/210}/dwy-semver/scripts/bump.py" +0 -0
@@ -0,0 +1,365 @@
1
+ ---
2
+ name: dwy-github-action-publish
3
+ description: "GitHub Actions 打包分发避坑指南。先判断场景,再读取对应配置。场景 1:Python 含 C 扩展 / Cython / .so 的跨平台 wheel,用 cibuildwheel 构建并通过 PyPI Trusted Publisher(OIDC) 发布。场景 2:Electron 桌面应用多平台打包分发,用 electron-builder / electron-forge 在 macOS / Windows / Linux runner 上构建并发布 GitHub Release。覆盖 workflow YAML 解析、runner image 退役、matrix 拆分、跨平台 shell 引号、artifact/release、PyPI OIDC、Electron 签名/公证/Linux 依赖/产物命名等高频坑。触发条件:编辑或新建 .github/workflows/*.yml、用户说 GitHub Actions 打包 / 跨平台打包 / cibuildwheel / wheel build / Electron 打包 / electron-builder / electron-forge / GitHub Release 分发 / runner queued / workflow build 失败。也作为 dwy-publish 发版编排的 GA 打包子能力被主动调用。"
4
+ ---
5
+
6
+ # dwy-github-action-publish — GitHub Actions 打包分发避坑
7
+
8
+ 定位:使用 GitHub Actions 做跨平台构建、打包、发布时,先判定产物类型,再查对应配置避坑。
9
+
10
+ 本 skill 只处理 CI 打包分发链路。通用发版流程(测试 / bump / changelog / tag)走 `dwy-publish`;SDK 发布前安全审计走 `dwy-sdk-spec`;纯 Python 包不需要 cibuildwheel。
11
+
12
+ 实战来源:
13
+
14
+ - Python wheel:quant-sdk 0.4.0 首发 PyPI 的 cibuildwheel 踩坑。
15
+ - Electron:某 Electron 桌面应用多平台打包(release.yml + build.yml + pack.mjs)实战配置。
16
+
17
+ ---
18
+
19
+ ## 先判断场景
20
+
21
+ 先读用户目标和仓库配置,不要直接套模板。
22
+
23
+ | 场景 | 判断依据 | 必读配置 |
24
+ |---|---|---|
25
+ | Python wheel | `pyproject.toml` 含 `Cython` / `ext_modules` / `Extension` / 产物含 `.so` / 用户提 `cibuildwheel`、`wheel`、`PyPI` | `.github/workflows/*.yml`、`pyproject.toml`、`setup.py` / `setup.cfg`、`tests/` |
26
+ | Electron 桌面应用 | `package.json` 含 `electron` + `electron-builder` / `electron-forge`,用户提 Electron 多平台打包、GitHub Release、`dmg` / `exe` / `AppImage` | `.github/workflows/*.yml`、`package.json`、`electron-builder` 配置、`forge.config.*`、打包脚本 |
27
+
28
+ 如果同时存在两个场景,拆成两个 workflow 或两个 job 组分别处理。不要把 Python wheel 的 PyPI OIDC 规则套到 Electron,也不要把 Electron 的签名/产物规则套到 Python wheel。
29
+
30
+ ---
31
+
32
+ ## 通用 GitHub Actions 检查
33
+
34
+ 改任何 workflow 后先做这些检查。
35
+
36
+ ```bash
37
+ # 1. YAML 必须能本地解析
38
+ python3 -c "import yaml; yaml.safe_load(open('.github/workflows/release.yml'))"
39
+
40
+ # 2. 检查 workflow 触发条件
41
+ gh workflow list
42
+ gh run list --workflow=release.yml --limit=5
43
+
44
+ # 3. run 几秒 fail 且 jobs 为空,多半是 YAML 解析失败
45
+ gh run view <run-id> --json jobs,conclusion
46
+ ```
47
+
48
+ 通用坑:
49
+
50
+ - GitHub Action 不一定有 `v<N>` major alias。改 `uses:` 前查对应仓库 tag。
51
+ - `run` / `env` 值里含 `:`、`=:all:`、`http://`、`${{ }}` 组合时,优先整体加引号。
52
+ - matrix 不要默认 `fail-fast: true`。跨平台打包应设 `fail-fast: false`,保留其他平台产物和日志。
53
+ - 不要使用退役 runner:`macos-13` / `macos-12` / `macos-11` / `ubuntu-20.04` 等会排队或失败。先查 `actions/runner-images` 当前 supported labels。
54
+ - 长时间卡 `Waiting for a runner to pick up this job...`,优先怀疑 runner label 已退役或额度/架构不可用。
55
+ - 发布 GitHub Release 需要 `permissions: contents: write`。
56
+ - PyPI Trusted Publisher 需要 `permissions: id-token: write`,并绑定 workflow 和 environment。
57
+ - artifact 名称必须包含平台和架构,避免多个 matrix 上传时互相覆盖。
58
+
59
+ ---
60
+
61
+ ## 场景 1:Python Cython wheel + PyPI OIDC
62
+
63
+ 适用:含 Cython 编译扩展的 Python 包、跨平台 wheel 分发(linux x86_64/aarch64 + macOS x86_64/arm64 + Windows AMD64)、GitHub Actions + cibuildwheel + PyPI Trusted Publisher OIDC 发版。
64
+
65
+ 模板:复制 `./references/release-workflow-template.yml` 到目标项目 `.github/workflows/release.yml`,只改:
66
+
67
+ 1. `package-dir: <PACKAGE_DIR>`:实际 SDK 子目录;单包仓库填 `.` 或省略。
68
+ 2. `CIBW_BUILD`:按需调整 Python 版本枚举。
69
+
70
+ ### Python 必查配置
71
+
72
+ ```bash
73
+ rg -n "Cython|ext_modules|Extension|cibuildwheel|pypa/gh-action-pypi-publish|license|version" pyproject.toml setup.py setup.cfg .github/workflows
74
+ ```
75
+
76
+ 检查点:
77
+
78
+ - `[build-system].requires` 含 `setuptools>=77`、`packaging>=24.2`、`wheel`、`Cython>=3.0.10`。
79
+ - `pypa/cibuildwheel` 用 minor tag 或精确 tag,例如 `pypa/cibuildwheel@v3.4`,不要写 `@v3`。
80
+ - monorepo 用 `with.package-dir`,测试命令使用 `{package}`,不要用 `{project}/tests`。
81
+ - 跨平台 shell 参数用外单内双:`'pytest {package}/tests -v -k "not requires_server"'`。
82
+ - Linux 依赖 pyarrow / pandas / numpy / scipy / lxml 时,manylinux 镜像用 `manylinux_2_28`。
83
+ - test 阶段大依赖用 binary-only 预装:`CIBW_BEFORE_TEST: "pip install --only-binary=:all: pyarrow pandas"`。
84
+ - macOS x86_64 用 `macos-15-intel`,不要用 `macos-13`。
85
+ - 默认只发布 wheel。不要发布 sdist,避免 Cython 编译模块源码随 sdist 泄漏。
86
+
87
+ ### Python 8 个高频坑
88
+
89
+ #### 坑 1:PEP 639 license expression 触发 build env 依赖冲突
90
+
91
+ 症状:
92
+
93
+ ```text
94
+ ImportError: Cannot import `packaging.licenses`.
95
+ Setuptools>=77.0.0 requires "packaging>=24.2" to work properly.
96
+ ```
97
+
98
+ 根因:`pyproject.toml` 用 `license = "MIT"` 时,setuptools 77+ 校验 license expression 依赖 `packaging>=24.2`,cibuildwheel 临时 build env 可能装到旧 packaging。
99
+
100
+ 修复:
101
+
102
+ ```toml
103
+ [build-system]
104
+ requires = [
105
+ "setuptools>=77",
106
+ "packaging>=24.2",
107
+ "wheel",
108
+ "Cython>=3.0.10",
109
+ ]
110
+ build-backend = "setuptools.build_meta"
111
+ ```
112
+
113
+ #### 坑 2:cibuildwheel action 必须用 minor 级或精确 tag
114
+
115
+ 症状:
116
+
117
+ ```text
118
+ Unable to resolve action `pypa/cibuildwheel@v3`, unable to find version `v3`
119
+ ```
120
+
121
+ 修复:
122
+
123
+ ```yaml
124
+ - uses: pypa/cibuildwheel@v3.4
125
+ # 或
126
+ - uses: pypa/cibuildwheel@v3.4.1
127
+ ```
128
+
129
+ #### 坑 3:YAML 字符串含冒号必须加引号
130
+
131
+ 错误:
132
+
133
+ ```yaml
134
+ CIBW_BEFORE_TEST: pip install --only-binary=:all: pyarrow
135
+ ```
136
+
137
+ 正确:
138
+
139
+ ```yaml
140
+ CIBW_BEFORE_TEST: "pip install --only-binary=:all: pyarrow pandas"
141
+ ```
142
+
143
+ #### 坑 4:CIBW_TEST_COMMAND 用 `{package}` 不要用 `{project}`
144
+
145
+ ```yaml
146
+ - uses: pypa/cibuildwheel@v3.4
147
+ with:
148
+ package-dir: quant-sdk
149
+ env:
150
+ CIBW_TEST_COMMAND: 'pytest {package}/tests -v -k "not requires_server"'
151
+ ```
152
+
153
+ #### 坑 5:跨平台 shell 引号必须外单内双
154
+
155
+ 错误:
156
+
157
+ ```yaml
158
+ CIBW_TEST_COMMAND: "pytest {package}/tests -v -k 'not requires_server'"
159
+ ```
160
+
161
+ 正确:
162
+
163
+ ```yaml
164
+ CIBW_TEST_COMMAND: 'pytest {package}/tests -v -k "not requires_server"'
165
+ ```
166
+
167
+ #### 坑 6:manylinux 镜像必须升到 `_2_28`
168
+
169
+ ```yaml
170
+ env:
171
+ CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
172
+ CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
173
+ ```
174
+
175
+ #### 坑 7:测试阶段三方依赖必须强制 binary
176
+
177
+ ```yaml
178
+ env:
179
+ CIBW_TEST_REQUIRES: pytest pytest-asyncio respx
180
+ CIBW_BEFORE_TEST: "pip install --only-binary=:all: pyarrow pandas"
181
+ CIBW_TEST_COMMAND: 'pytest {package}/tests -v -k "not requires_server"'
182
+ ```
183
+
184
+ #### 坑 8:macos-13 runner 已退休
185
+
186
+ ```yaml
187
+ matrix:
188
+ include:
189
+ - { os: ubuntu-latest, archs: x86_64 }
190
+ - { os: ubuntu-24.04-arm, archs: aarch64 }
191
+ - { os: macos-15-intel, archs: x86_64 }
192
+ - { os: macos-14, archs: arm64 }
193
+ - { os: windows-latest, archs: AMD64 }
194
+ ```
195
+
196
+ ---
197
+
198
+ ## 场景 2:Electron 多平台打包 + GitHub Release
199
+
200
+ 适用:Electron 桌面应用需要在 GitHub Actions 产出 macOS / Windows / Linux 安装包,并上传到 GitHub Release。
201
+
202
+ 参考配置:
203
+
204
+ - `./references/electron-release-workflow-template.yml`
205
+
206
+ ### Electron 必查配置
207
+
208
+ ```bash
209
+ rg -n "electron|electron-builder|electron-forge|pack|dist|dmg|AppImage|nsis|appx|CSC|notar|publish|artifactName|extraResources|asar|submodules" package.json .github/workflows script src -g '!node_modules'
210
+ ```
211
+
212
+ 检查点:
213
+
214
+ - `package.json` 明确 `electron` 和打包工具版本,例如 `electron-builder`。
215
+ - workflow 用 `actions/checkout@v4`,项目依赖 submodule 时必须 `submodules: true`。
216
+ - Node 版本固定,例如 `actions/setup-node@v4` + `node-version: 20`。
217
+ - 使用锁文件安装:npm 项目用 `npm ci`,pnpm 项目用 `pnpm install --frozen-lockfile`。
218
+ - 每个平台在对应 runner 上打包,不要指望一个 Linux runner 交叉产出 macOS / Windows 完整安装包。
219
+ - macOS x64 和 arm64 分开:x64 用 `macos-15-intel`,arm64 用 `macos-latest` / `macos-14`。
220
+ - Linux AppImage 需要系统依赖,常见为 `icnsutils graphicsmagick xz-utils`。
221
+ - Linux runner 上 `apt-get update` 前可移除易失效的 Microsoft / Azure apt source,避免第三方源拖死打包。
222
+ - 未配置证书但要产出 unsigned 包时,设置 `CSC_IDENTITY_AUTO_DISCOVERY: false`,避免 electron-builder 自动找证书导致 macOS job 失败。
223
+ - 产物命名必须包含 `${version}`、`${os}`、`${arch}`,避免 Release asset 覆盖。
224
+ - upload-artifact 只上传最终安装包:`*.dmg`、`*.exe`、`*.AppImage`;不要上传 `win-unpacked/`。
225
+ - GitHub Release job 需要 `permissions: contents: write`,用 `actions/download-artifact@v4` + `merge-multiple: true` 汇总产物。
226
+
227
+ ### Electron 推荐 workflow 形态
228
+
229
+ 模板:复制 `./references/electron-release-workflow-template.yml` 到目标项目 `.github/workflows/release.yml`,再按项目实际包管理器、打包脚本、签名策略调整。完整 workflow 见该模板,下方高频坑解释各关键配置的原因。
230
+
231
+ ### Electron 多平台高频坑
232
+
233
+ #### 坑 1:macOS x64 / arm64 不能混跑
234
+
235
+ macOS x64 用 `macos-15-intel`。macOS arm64 用 `macos-latest` / `macos-14`。不要用已退役的 `macos-13`。
236
+
237
+ #### 坑 2:Linux 打 AppImage 缺系统依赖
238
+
239
+ 症状通常是图标转换、压缩、AppImage 生成失败。
240
+
241
+ ```yaml
242
+ sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils
243
+ ```
244
+
245
+ #### 坑 3:Ubuntu 第三方 apt 源拖死 `apt-get update`
246
+
247
+ GitHub hosted runner 预置源会变化。第三方源异常时,先移除无关 source。
248
+
249
+ ```yaml
250
+ sudo rm -f /etc/apt/sources.list.d/azure-cli.list /etc/apt/sources.list.d/microsoft-prod.list
251
+ sudo apt-get update
252
+ ```
253
+
254
+ #### 坑 4:未签名构建被 electron-builder 自动证书探测拖死
255
+
256
+ 公开 unsigned 包或暂未配置证书时:
257
+
258
+ ```yaml
259
+ env:
260
+ CSC_IDENTITY_AUTO_DISCOVERY: false
261
+ ```
262
+
263
+ 如果需要签名/公证,显式配置 secrets:`CSC_LINK`、`CSC_KEY_PASSWORD`、`APPLE_ID`、`APPLE_APP_SPECIFIC_PASSWORD`、`APPLE_TEAM_ID`。不要同时依赖自动探测。
264
+
265
+ #### 坑 5:产物名不含平台架构导致 Release 覆盖
266
+
267
+ electron-builder 配置应使用稳定命名:
268
+
269
+ ```js
270
+ artifactName: '${productName}-${version}-${os}-${arch}.${ext}'
271
+ ```
272
+
273
+ #### 坑 6:只上传最终安装包
274
+
275
+ 推荐:
276
+
277
+ ```yaml
278
+ path: |
279
+ release/**/*.dmg
280
+ release/**/*.exe
281
+ release/**/*.AppImage
282
+ ```
283
+
284
+ 需要自动更新时再上传 `*-latest.yml`。不要上传 `win-unpacked/`。
285
+
286
+ #### 坑 7:外部二进制资源必须在打包前下载
287
+
288
+ 如果应用依赖 ADB、scrcpy server、native helper、Java/Android 构建产物,必须在 `npm run pack` 前完成下载或构建,并确保路径进入 `extraResources` / `files`。
289
+
290
+ #### 坑 8:Release job 必须先汇总 artifact 再发布
291
+
292
+ ```yaml
293
+ - uses: actions/download-artifact@v4
294
+ with:
295
+ path: artifacts
296
+ merge-multiple: true
297
+ ```
298
+
299
+ 发布前用 `find artifacts -type f` 打印文件列表,确认平台产物齐全。
300
+
301
+ ---
302
+
303
+ ## 安全重发流程
304
+
305
+ ### Python PyPI
306
+
307
+ 前提:PyPI 上还没有 publish 成功该版本号。PyPI 版本号一旦发布成功,永久不可复用,必须 bump 下一个版本。
308
+
309
+ ```bash
310
+ gh run cancel <run-id>
311
+ git add <修改文件>
312
+ git commit -m "ci(sdk): 修复 xxx"
313
+ git push origin main
314
+ git push origin :refs/tags/v0.4.0
315
+ git tag -d v0.4.0
316
+ git tag v0.4.0
317
+ git push origin v0.4.0
318
+ gh run watch "$(gh run list --workflow=release.yml --limit=1 --json databaseId --jq '.[0].databaseId')" --exit-status
319
+ ```
320
+
321
+ ### Electron GitHub Release
322
+
323
+ 如果 GitHub Release 已创建但产物错误,优先删错 release / tag 后重打,或 bump 版本。不要在同 tag 上混入不同 commit 的产物。
324
+
325
+ ```bash
326
+ gh release view v1.2.3
327
+ gh release delete v1.2.3 --cleanup-tag
328
+ git tag v1.2.3
329
+ git push origin v1.2.3
330
+ ```
331
+
332
+ 执行删除前必须确认用户允许,因为这会删除远端 release / tag。
333
+
334
+ ---
335
+
336
+ ## 不要做
337
+
338
+ - 不要在本地跑 `python -m build && twine upload` 替代跨平台 wheel 发布。
339
+ - 不要给 Cython 包发布 sdist,除非明确接受源码泄漏。
340
+ - 不要假设 GitHub Action 有 major moving tag。
341
+ - 不要跳过 workflow YAML 本地解析。
342
+ - 不要用退役 runner label。
343
+ - 不要让多个 matrix 上传同名 artifact。
344
+ - 不要在 Electron 未配置签名时依赖证书自动探测。
345
+ - 不要把 `win-unpacked/`、中间目录、缓存目录发进 Release。
346
+ - 不要在一个 runner 上硬交叉构建所有 Electron 平台。
347
+
348
+ ---
349
+
350
+ ## 违规检测清单
351
+
352
+ | 检查项 | 违规模式 | 严重程度 |
353
+ |---|---|---|
354
+ | YAML 解析 | env / run 含 `:` 未加引号,run 几秒 fail 且 jobs 为空 | 致命 |
355
+ | action tag | `pypa/cibuildwheel@v3` 等不存在 alias | 致命 |
356
+ | runner | `macos-13` / `macos-12` / `ubuntu-20.04` | 致命 |
357
+ | artifact | matrix 上传同名产物或未带平台架构 | 高 |
358
+ | Python build-system | PEP 639 license 但缺 `packaging>=24.2` | 致命 |
359
+ | Python test path | monorepo 子目录用 `{project}/tests` | 高 |
360
+ | Python shell 引号 | Windows 跨平台命令里用单引号包参数 | 高 |
361
+ | Python manylinux | 大型 C 库依赖仍用 manylinux2014 | 高 |
362
+ | Electron macOS | x64 / arm64 未拆 runner | 高 |
363
+ | Electron Linux | AppImage 缺 `icnsutils graphicsmagick xz-utils` | 高 |
364
+ | Electron 签名 | unsigned 构建未设 `CSC_IDENTITY_AUTO_DISCOVERY: false` | 中 |
365
+ | Electron Release | 上传 unpacked 中间目录或漏最终安装包 | 高 |
@@ -0,0 +1,98 @@
1
+ # Electron 多平台打包 + GitHub Release workflow 模板
2
+ #
3
+ # 来源参考: 某 Electron 桌面应用多平台打包实战 (release.yml + pack.mjs)
4
+ #
5
+ # 使用前按项目实际情况替换:
6
+ # 1. node-version
7
+ # 2. 包管理器安装命令(npm ci / pnpm install --frozen-lockfile)
8
+ # 3. build / pack 命令
9
+ # 4. Linux 系统依赖
10
+ # 5. 签名 / 公证 secrets
11
+ # 6. artifact path 和文件命名
12
+
13
+ name: Build and Release
14
+
15
+ on:
16
+ push:
17
+ tags:
18
+ - "v*"
19
+ workflow_dispatch:
20
+
21
+ permissions:
22
+ contents: write
23
+
24
+ jobs:
25
+ build:
26
+ strategy:
27
+ fail-fast: false
28
+ matrix:
29
+ include:
30
+ - os: macos-15-intel
31
+ platform: mac-x64
32
+ packArgs: ""
33
+ - os: macos-latest
34
+ platform: mac-arm64
35
+ packArgs: "-- --arm64"
36
+ - os: windows-latest
37
+ platform: win
38
+ packArgs: ""
39
+ - os: ubuntu-latest
40
+ platform: linux
41
+ packArgs: "-- --linux"
42
+
43
+ runs-on: ${{ matrix.os }}
44
+
45
+ steps:
46
+ - uses: actions/checkout@v4
47
+ with:
48
+ submodules: true
49
+
50
+ - uses: actions/setup-node@v4
51
+ with:
52
+ node-version: 20
53
+
54
+ - name: Install Linux packaging dependencies
55
+ if: matrix.os == 'ubuntu-latest'
56
+ run: |
57
+ sudo rm -f /etc/apt/sources.list.d/azure-cli.list /etc/apt/sources.list.d/microsoft-prod.list
58
+ sudo apt-get update
59
+ sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils
60
+
61
+ - name: Install dependencies
62
+ run: npm ci
63
+
64
+ - name: Build
65
+ run: npm run build
66
+
67
+ - name: Package
68
+ run: npm run pack ${{ matrix.packArgs }}
69
+ env:
70
+ CSC_IDENTITY_AUTO_DISCOVERY: false
71
+
72
+ - name: Upload artifacts
73
+ uses: actions/upload-artifact@v4
74
+ with:
75
+ name: release-${{ matrix.platform }}
76
+ path: |
77
+ release/**/*.dmg
78
+ release/**/*.exe
79
+ release/**/*.AppImage
80
+
81
+ release:
82
+ needs: build
83
+ runs-on: ubuntu-latest
84
+ steps:
85
+ - uses: actions/download-artifact@v4
86
+ with:
87
+ path: artifacts
88
+ merge-multiple: true
89
+
90
+ - name: List release files
91
+ run: find artifacts -type f
92
+
93
+ - name: Create GitHub Release
94
+ uses: softprops/action-gh-release@v2
95
+ with:
96
+ files: artifacts/**/*
97
+ generate_release_notes: true
98
+ draft: false
@@ -1,6 +1,6 @@
1
1
  # Python Cython SDK 跨平台 wheel + PyPI Trusted Publisher 发版 workflow 模板
2
2
  #
3
- # 已内置 dwy-cibuildwheel skill 7 个避坑修复,开箱即用。
3
+ # 已内置 dwy-github-action-publish skill Python wheel 场景 8 个避坑修复,开箱即用。
4
4
  # 复制到项目 .github/workflows/release.yml,只改两处:
5
5
  # 1. package-dir: <PACKAGE_DIR> —— 实际 SDK 子目录(monorepo 必填,单包仓库填 . 或省略)
6
6
  # 2. CIBW_BUILD —— 按需调整 Python 版本枚举
@@ -42,7 +42,7 @@ jobs:
42
42
  include:
43
43
  - { os: ubuntu-latest, archs: x86_64 }
44
44
  - { os: ubuntu-24.04-arm, archs: aarch64 }
45
- # 坑 8: macos-13 已于 2025-12-04 退休,用 macos-15-intel(真 Intel runner)替代
45
+ # 坑 8: macos-13 已退休,用 macos-15-intel(真 Intel runner)替代
46
46
  # 如果不需要 x86_64 wheel,删掉下一行,Intel Mac 用户走 Rosetta 跑 arm64 wheel
47
47
  - { os: macos-15-intel, archs: x86_64 }
48
48
  - { os: macos-14, archs: arm64 }
@@ -66,7 +66,7 @@ jobs:
66
66
  CIBW_MUSLLINUX_X86_64_IMAGE: musllinux_1_2
67
67
  CIBW_MUSLLINUX_AARCH64_IMAGE: musllinux_1_2
68
68
  CIBW_TEST_REQUIRES: pytest pytest-asyncio respx
69
- # 坑 3 + 坑 7: 整行加双引号避免 YAML 冒号歧义;强制 binary 防止源码 build 链
69
+ # 坑 3 + 坑 7: 整行加双引号避免 YAML 冒号歧义; 强制 binary 防止源码 build 链
70
70
  CIBW_BEFORE_TEST: "pip install --only-binary=:all: pyarrow pandas"
71
71
  # 坑 4 + 坑 5: monorepo 用 {package} 而非 {project};外单内双跨平台兼容
72
72
  CIBW_TEST_COMMAND: 'pytest {package}/tests -v -k "not requires_server"'
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: dwy-publish
3
+ description: "发版/部署编排器。触发条件:用户说\"发版\"\"部署\"\"发布上线\"\"release\"\"publish\"\"走发版流程\"时。按应用目录确认发布方式并缓存,串起定版本→changelog→安全检查→build/发布→监控→通知。版本号决策单独走 dwy-semver,GA 打包走 dwy-github-action-publish,发布前安全检查走 dwy-sdk-spec——本 skill 负责编排,按路径主动调它们。"
4
+ ---
5
+
6
+ # 发版编排器
7
+
8
+ 一条发版链的编排执行。进入前测试已完成。
9
+
10
+ **先**读仓库上下文,判目标平台(前端/后端/Android/iOS/鸿蒙/通用)+ 定位应用目录(相对项目根的相对路径)。**再**按下表执行 8 步。
11
+
12
+ | # | 步骤 | 类型 | 调用 |
13
+ |---|------|------|------|
14
+ | 1 | 确认发布方式 + 探测 build/publish 命令 | 项目步 | `scripts/release_config.sh` + `references/publish-config.md` |
15
+ | 2 | 写/校验发布配置(GA workflow / TestFlight 就绪) | 项目步 | `references/publish-config.md` |
16
+ | 3 | 定版本号 + 多文件同步 | 通用步 | `../dwy-semver` + `references/version-sync.md` |
17
+ | 4 | 写 changelog(按平台子目录) | 通用步 | `references/changelog.md` |
18
+ | 5 | 安全检查(闸门,未过不发) | 通用步 | `../dwy-sdk-spec` |
19
+ | 6 | build + 触发发布 | 项目步 | `references/<平台>.md`;走 GA 引 `../dwy-github-action-publish` |
20
+ | 7 | 监控发布进程 | 项目步 | `references/monitor-notify.md` |
21
+ | 8 | 通知结果(输出结果文本) | — | `references/monitor-notify.md` |
22
+
23
+ 平台流程文件:`frontend-deploy.md` / `backend-deploy.md` / `ios.md` / `android.md` / `harmony.md` / `generic-release.md`。
24
+
25
+ ## 编排约束
26
+
27
+ - **通用步固化**(定版本/changelog/安全检查跨项目一致,走子 skill/脚本);**项目步读上下文+缓存**(build/deploy/监控命令因项目而异,**绝不写死**,探测不到问用户后缓存)。
28
+ - 安全检查(第 5 步)是闸门,未过不进发布。
29
+ - 全程 AI 自动判断、自动跑,仅搞不定时才问用户(版本级别拿不准、命令探测不到、配置缺失、构建/发布失败)。
30
+ - 编排时按文件路径主动加载子 skill(`../dwy-semver`、`../dwy-sdk-spec`、`../dwy-github-action-publish`);这些 skill 也可被用户独立触发。
31
+ - `.dwy/` 缓存提醒用户加进 `.gitignore`。
@@ -0,0 +1,31 @@
1
+ # Android 发布流程
2
+
3
+ 适用:Android 产物——**应用包(apk/aab→分发/商店)** 或 **SDK(aar→maven)**。
4
+
5
+ ## 先判产物形态
6
+
7
+ - 应用包:有 application module、产出 apk/aab → 走 app 路径
8
+ - SDK:library module、产出 aar、有 maven publish 配置 → 走 SDK 路径
9
+
10
+ ## 版本(通用步,固化)
11
+
12
+ - `versionName` = 语义版本号,走 `../dwy-semver` 决策 + bump.py。
13
+ - `versionCode` = 单调递增整数,每次发布 +1。
14
+ - 多文件同步见 `version-sync.md`。
15
+
16
+ ## build / publish(项目步,不写死命令)
17
+
18
+ 命令来自缓存(build_cmd/publish_cmd),缓存缺则按 `publish-config.md` 探测:
19
+ - 探测线索:`build.gradle(.kts)` task、`gradlew`、`fastlane/`、CI workflow
20
+ - 探测不到→问用户→缓存
21
+
22
+ 按缓存 method 分流:
23
+ - `maven` → 用项目实际的 maven 发布命令(gradle publish task / 私有源)
24
+ - `github-action` → 引 `../dwy-github-action-publish`(先过通用检查)
25
+ - `local` → 缓存的本地构建/发布命令
26
+
27
+ ## changelog / 安全检查 / 监控
28
+
29
+ - changelog → `changelog.md`(写 `android/CHANGELOG.md`)
30
+ - 安全检查 → `../dwy-sdk-spec`
31
+ - 监控 + 结果 → `monitor-notify.md`
@@ -0,0 +1,23 @@
1
+ # 后端部署流程
2
+
3
+ 适用:后端服务、API、容器或镜像、线上后端环境。
4
+
5
+ ## 版本(通用步,固化)
6
+
7
+ - 走 `../dwy-semver` 决策 + bump.py;多文件同步见 `version-sync.md`(Python 须同步 `pyproject.toml` 的 `version` 和包 `__init__.py` 的 `__version__`)。
8
+ - 纯重发、仅重跑 workflow、仅补环境配置、仅回滚已有构建时可不 bump。
9
+
10
+ ## build / deploy(项目步,不写死命令)
11
+
12
+ 命令来自缓存(build_cmd/publish_cmd),缓存缺则按 `publish-config.md` 探测:
13
+ - 探测线索:`Dockerfile`、`docker-compose`、部署脚本、`Makefile`、`pyproject.toml`、CI workflow
14
+ - 探测不到→问用户→缓存
15
+
16
+ 按缓存 method 分流:
17
+ - `github-action` → 引 `../dwy-github-action-publish`(CI 推荐 OIDC,先过通用检查)
18
+ - `local` → 缓存的本地构建/部署命令(打镜像 / 部署脚本)
19
+
20
+ ## changelog / 监控
21
+
22
+ - changelog → `changelog.md`(写 `backend/CHANGELOG.md`)
23
+ - 监控 + verify → `monitor-notify.md`(后端信号:健康检查 / 版本接口 / 运行日志 / 镜像 tag)
@@ -0,0 +1,37 @@
1
+ # CHANGELOG 按平台子目录各写一份
2
+
3
+ monorepo 下一个仓库可能同时含 android / ios / harmony / frontend / backend 多平台。**每个平台维护自己的 CHANGELOG,不写全局单份**。发哪个平台,只写哪个平台那份。
4
+
5
+ ## 各平台 CHANGELOG 位置
6
+
7
+ - `android/CHANGELOG.md`
8
+ - `ios/CHANGELOG.md`
9
+ - `harmony/CHANGELOG.md`
10
+ - `frontend/CHANGELOG.md`
11
+ - `backend/CHANGELOG.md`
12
+
13
+ 子目录名按仓库实际结构定(先在第 0 步识别平台目录)。
14
+
15
+ ## 写法
16
+
17
+ 1. 找该平台上一个 release tag
18
+ 2. 按平台子目录过滤 commit:
19
+
20
+ ```bash
21
+ git log <last-tag>..HEAD --oneline -- <平台子目录>/
22
+ ```
23
+
24
+ 3. 按 `feat` / `fix` / `refactor` / `chore` 分组
25
+ 4. 写入该平台 `CHANGELOG.md`,标注新版本号
26
+
27
+ 如果仓库已有自动生成命令(changelogen 等),优先使用,但仍按平台目录过滤范围。
28
+
29
+ ## 自动执行
30
+
31
+ changelog 由 AI 自动生成并写入,不强制逐步确认。仅当 commit 历史无法清晰归类、或平台目录边界不明时才停下问用户。
32
+
33
+ ## 禁止
34
+
35
+ - 禁止写一份全局 CHANGELOG 混入多平台变更
36
+ - 禁止 changelog 未写完就进入部署
37
+ - 禁止把其他平台的 commit 写进当前平台 CHANGELOG(必须按目录过滤)
@@ -0,0 +1,23 @@
1
+ # 前端部署流程
2
+
3
+ 适用:站点、SPA、SSR、前端容器镜像或线上前端环境。
4
+
5
+ ## 版本(通用步,固化)
6
+
7
+ - 走 `../dwy-semver` 决策 + bump.py;多文件同步见 `version-sync.md`(前端改 `package.json` 的 `version`)。
8
+ - 纯重发、仅重跑 workflow、仅回滚已有构建时可不 bump。
9
+
10
+ ## build / deploy(项目步,不写死命令)
11
+
12
+ 命令来自缓存(build_cmd/publish_cmd),缓存缺则按 `publish-config.md` 探测:
13
+ - 探测线索:`package.json` scripts(build/deploy)、`vite.config.*`、`Dockerfile`、`Makefile`、CI workflow
14
+ - 探测不到→问用户→缓存
15
+
16
+ 按缓存 method 分流:
17
+ - `github-action` → 引 `../dwy-github-action-publish`(CI 推荐 OIDC,先过通用检查)
18
+ - `local` → 缓存的本地构建/部署命令(推镜像 / 传 CDN·OSS / 部署脚本)
19
+
20
+ ## changelog / 监控
21
+
22
+ - changelog → `changelog.md`(写 `frontend/CHANGELOG.md`)
23
+ - 监控 + verify → `monitor-notify.md`(前端信号:页面访问 / 版本接口 / 产物 hash / CDN 刷新)
@@ -0,0 +1,27 @@
1
+ # 通用发布流程(兜底)
2
+
3
+ 适用:不属于前端 / 后端 / Android / iOS / 鸿蒙 五类的发布——CLI 二进制、Docker 镜像、纯 PyPI / npm 库、其他对外包或环境。dwy-shared 自身的 eui / ekit / eapi / cli 走这条。
4
+
5
+ ## 版本(通用步,固化)
6
+
7
+ - 走 `../dwy-semver` 决策 + bump.py;多文件同步见 `version-sync.md`(Python 同步 `pyproject.toml` + `__init__.py`,Node 同步 `package.json`)。
8
+ - 纯重发、仅重跑 workflow、仅回滚已有构建时可不 bump。
9
+
10
+ ## build / publish(项目步,不写死命令)
11
+
12
+ 命令来自缓存(build_cmd/publish_cmd),缓存缺则按 `publish-config.md` 探测:
13
+ - 探测线索:`package.json` scripts、`pyproject.toml`、`Makefile`、发布脚本、CI workflow
14
+ - 探测不到→问用户→缓存
15
+
16
+ 按缓存 method 分流:
17
+ - `github-action-oidc` → **PyPI/npm 首选**,引 `../dwy-github-action-publish`(OIDC + Trusted Publisher)
18
+ - `github-action` → Cython wheel / Electron / 镜像,引 `../dwy-github-action-publish`
19
+ - `local` → 缓存的本地发包命令(`uv publish` / `pnpm publish` 等)
20
+
21
+ **PyPI/npm 未配置 GA 时按 `publish-config.md` 主动推荐 OIDC。**
22
+
23
+ ## changelog / 安全检查 / 监控
24
+
25
+ - changelog → `changelog.md`(单包仓库根目录一份;monorepo 按包目录过滤)
26
+ - 安全检查 → `../dwy-sdk-spec`(对外包必查泄露/产物)
27
+ - 监控 + verify → `monitor-notify.md`(包仓库版本查询 / GitHub Release)