File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ napgram-plugin-template/
161161├── scripts/
162162│ ├── pack.mjs # 打包脚本
163163│ └── marketplace-snippet.mjs
164+ │ └── marketplace-upsert.mjs
164165├── napgram-plugin.json # 插件元信息
165166├── package.json
166167├── tsconfig.json
@@ -174,6 +175,19 @@ napgram-plugin-template/
1741753 . 生成索引片段:` pnpm marketplace:snippet `
1751764 . 提交 PR 到 NapGram Marketplace 仓库
176177
178+ ### 自动化发布(推荐)
179+
180+ 打 tag 后 Release workflow 会自动:
181+ 1 . 打包产物并生成 ` marketplace-index-snippet.json `
182+ 2 . 若配置了 ` MARKETPLACE_PR_TOKEN ` ,自动向 marketplace 提交 PR(你负责合并)
183+
184+ 需要在** 实际插件仓库** 配置以下 Secrets:
185+ - ` NPM_TOKEN ` :npm automation token(用于 publish)
186+ - ` MARKETPLACE_PR_TOKEN ` :GitHub PAT(公开仓库用 ` public_repo ` 即可)
187+
188+ 可选配置:
189+ - ` MARKETPLACE_DIST_HOST ` :自定义资源下载域名,未设置时默认使用 GitHub Release 下载链接
190+
177191## 示例插件
178192
179193查看 ` src/index.ts ` 中的 Ping Pong 插件示例。
You can’t perform that action at this time.
0 commit comments