{"id":15287054,"url":"https://github.com/ineo6/mp-ci","last_synced_at":"2025-10-07T00:23:57.004Z","repository":{"id":45083677,"uuid":"269063483","full_name":"ineo6/mp-ci","owner":"ineo6","description":"微信小程序、小游戏发布助手（CI）","archived":false,"fork":false,"pushed_at":"2024-09-08T08:26:24.000Z","size":30,"stargazers_count":95,"open_issues_count":1,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-01T08:53:59.814Z","etag":null,"topics":["ci","deploy","jenkins","minigame","miniprogram","wechat"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ineo6.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-03T10:55:15.000Z","updated_at":"2025-04-19T04:00:00.000Z","dependencies_parsed_at":"2024-10-28T08:13:26.287Z","dependency_job_id":null,"html_url":"https://github.com/ineo6/mp-ci","commit_stats":{"total_commits":20,"total_committers":4,"mean_commits":5.0,"dds":"0.15000000000000002","last_synced_commit":"6a4272c92613f4baaf2ad6c03550f65a9f49109d"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ineo6/mp-ci","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineo6%2Fmp-ci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineo6%2Fmp-ci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineo6%2Fmp-ci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineo6%2Fmp-ci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ineo6","download_url":"https://codeload.github.com/ineo6/mp-ci/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineo6%2Fmp-ci/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259347145,"owners_count":22843846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","deploy","jenkins","minigame","miniprogram","wechat"],"created_at":"2024-09-30T15:24:02.639Z","updated_at":"2025-10-07T00:23:51.964Z","avatar_url":"https://github.com/ineo6.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# 微信小程序(游戏)发布助手（mp-ci）\n\n[![version][version-badge]][package]\n[![downloads][downloads-badge]][npm-stat]\n\n[![PRs Welcome][prs-badge]][prs]\n\n[![Watch on GitHub][github-watch-badge]][github-watch]\n[![Star on GitHub][github-star-badge]][github-star]\n\n微信小程序(游戏)发布助手, 支持预览和上传。可以和`Jenkins`、`GitHub Actions`结合使用，实现自动化发布。\n\n基于官方`miniprogram-ci`封装。\n\n## 功能特性\n\n- 无需扫码登录\n- 自动读取`appid`、`setting`\n- 提交信息智能生成\n- 美化执行结果显示\n\n## Installation\n\n```shell\n// 全局安装\nnpm install -g mp-ci\n\n// 本地安装\nnpm install --save-dev mp-ci\n```\n\n\u003e 使用前需要使用小程序管理员身份访问\"[微信公众平台](https://mp.weixin.qq.com/)-开发-开发设置\"后下载代码上传密钥，并配置 IP 白名单，才能进行上传、预览操作。\n\n### 注意事项\n\n- 代码上传密钥拥有预览、上传代码的权限\n- 代码上传密钥不会明文存储在微信公众平台上，一旦遗失必须重置，请妥善保管\n- 未配置IP白名单的，将无法使用 `mp-ci` 进行预览和上传\n- 可选择不对IP进行限制，但务必明白风险\n\n## Usage\n\n```sh\nUsage: mp-ci [--options ...]\n\nOptions:\n  -V, --version                  output the version number\n  -h, --help                     display help for command\n\nCommands:\n  upload [options] [workspace]   上传代码\n  preview [options] [workspace]  预览代码\n  help [command]                 display help for command\n```\n\n\n`Commands`里面的`workspace`代表项目目录，默认使用命令执行目录，同时会检查`project.config.json`文件是否存在，并读取`appid`、`setting`设置。\n\n命令返回的结果值如下:\n\n- 0: 成功\n- 1: 失败\n\n### upload\n\n```sh\nUsage: mp-ci upload [options] [workspace]\n\n上传代码\n\nOptions:\n  --env [value]     环境 (default: \"dev\")\n  --type [value]    项目类型 (default: \"miniProgram\")\n  --ver [value]     发布版本号\n  --desc [value]    发布简介\n  --pkp [value]     私钥文件所在路径\n  --proxy [value]   代理url\n  --robot [value]   指定CI机器人，1 ~ 30 (default: \"1\")\n  -h, --help        display help for command\n```\n\n### preview\n\n```sh\nUsage: mp-ci preview [options] [workspace]\n\n预览代码\n\nOptions:\n  --env [value]          环境 (default: \"dev\")\n  --type [value]         项目类型 (default: \"miniProgram\")\n  --ver [value]          发布版本号\n  --desc [value]         发布简介\n  --pkp [value]          私钥文件所在路径\n  --qr [value]           二维码文件的格式: terminal|base64|image (default: \"image\")\n  --qrDest [value]       二维码文件保存路径  (default: \"preview.png\")\n  --pagePath [value]     预览页面路径\n  --searchQuery [value]  预览页面路径启动参数，这里的\u0026字符在命令行中应写成转义字符\\\u0026\n  --proxy [value]        代理url\n  --robot [value]        指定CI机器人，1 ~ 30 (default: \"1\")\n  -h, --help             display help for command\n```\n\n说明：\n\n#### `version` \u0026 `desc`\n\n* `version`版本号规则\n  * 尝试读取目录下的 `package.json` 文件中`version`\n  * 例如: `1.0.0`\n* `desc`备注规则\n  * 读取命令行中传入的环境参数: `--env`\n  * 读取命令行中传入的备注参数: `--desc`\n  * 获取项目(`git`)最新`commit`的`message`\n  * 组合: `env: ${env} ${desc || message(hash)}`\n  * 例如: `env: dev 补充信息(e0c015a)`\n\n#### `pkp`\n\n私钥文件位置。\n\n小程序管理员身份访问\"[微信公众平台](https://mp.weixin.qq.com/)-开发-开发设置\"后下载密钥。\n\n#### `qr`\n\n可选值包括 `terminal`, `base64`, `image`。\n\n#### `qrDest`\n\n当`qr`设置为`base64`、`image`时，需要设置`qrDest`指定输出位置（相对于项项目目录）。\n\n#### `searchQuery`\n\n预览页面启动参数。\n\n**这里的`\u0026`字符在命令行中应写成转义字符`\\\u0026`**\n\n## 相关资源\n\n- [mp-ci-demo](https://github.com/ineo6/mp-ci-demo) ：`Taro`和`GitHub Actions`持续集成示例\n\n[version-badge]: https://img.shields.io/npm/v/mp-ci.svg?style=flat-square\n[package]: https://www.npmjs.com/package/mp-ci\n[downloads-badge]: https://img.shields.io/npm/dm/mp-ci.svg?style=flat-square\n[npm-stat]: http://npm-stat.com/charts.html?package=mp-ci\u0026from=2018-10-31\n[license-badge]: https://img.shields.io/npm/l/mp-ci.svg?style=flat-square\n[license]: https://github.com/ineo6/mp-ci/blob/master/LICENSE\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\n[prs]: http://makeapullrequest.com\n[coc-badge]: htts://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square\n[github-watch-badge]: https://img.shields.io/github/watchers/ineo6/mp-ci.svg?style=social\n[github-watch]: https://github.com/ineo6/mp-ci/watchers\n[github-star-badge]: https://img.shields.io/github/stars/ineo6/mp-ci.svg?style=social\n[github-star]: https://github.com/ineo6/mp-ci/stargazers\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fineo6%2Fmp-ci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fineo6%2Fmp-ci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fineo6%2Fmp-ci/lists"}