shipup
v0.3.0
Published
Cross-platform release CLI for App Store Connect, AppGallery Connect, and Android app markets
Maintainers
Readme
shipup
shipup 是一个跨平台应用商店发布 CLI,支持:
- HarmonyOS
.app:AppGallery Connect; - Android APK:华为、荣耀、OPPO、vivo、小米、三星、应用宝、魅族;
- iOS
.ipa:App Store Connect 上传、提审、状态查询和灰度发布。
它适合本地自动化和 CI:JSON 只写 stdout,过程信息写 stderr,状态和退出码统一,
--dry-run 只做本地校验,不发网络请求。
shipup是独立社区项目,与各应用市场运营方不存在隶属或官方背书关系。
环境
- Node.js 18.17 或更新版本;
- iOS 上传需要 macOS、Xcode 和
xcrun altool; - Android 自动提取图标需要 Android SDK 的
aapt/aapt2,也可显式传--icon; - 对目标应用具备相应权限的平台凭证。
安装
npm install --global shipup
shipup --help正式版本由 GitHub Actions 通过 OIDC Trusted Publishing 发布到 npm,工作流中不保存 长期 npm token。
凭证
mkdir -p ~/.config/shipup
cp creds.example.yaml ~/.config/shipup/credentials.yaml
chmod 600 ~/.config/shipup/credentials.yaml查找顺序为 --creds、SHIPUP_CREDS、~/.config/shipup/credentials.yaml。
值支持字面量、${ENVIRONMENT_VARIABLE} 和 @相对文件。完整结构见
凭证说明。
使用
# HarmonyOS
shipup harmony status
shipup harmony upload --package ./application.app --dry-run
# Android 多渠道
shipup android upload \
--upload huawei=./app-huawei.apk honor=./app-honor.apk \
--release-note @./release-note.txt \
--huawei-release-mode auto \
--submit-review --output json
shipup android status --channel huawei
# iOS
shipup ios upload --package ./application.ipa --dry-run
shipup ios submit --app-version 2.0.0 --build-version 200 --bundle-id com.example.app
shipup ios status --app-version 2.0.0 --bundle-id com.example.app
shipup ios release --app-version 2.0.0 --bundle-id com.example.app --phased命令总览:
shipup harmony upload|submit|status
shipup huawei upload|status # 原华为兼容命令
shipup android upload|status # Android 八渠道
shipup ios upload|submit|status|releaseAndroid 上传支持按渠道更新发布说明、图标、截图、应用名、一句话简介和长描述。 各市场具体支持情况见 平台行为 和 Android 市场能力表。
华为上传默认使用 --huawei-release-mode auto。检测到正在发布、已暂停或可继续的
草稿分阶段版本时,shipup 会让软件包上传、素材更新和提审统一使用
releaseType=3。可用 full 强制全网发布;首次显式使用 phased 时需提供
--huawei-phased-start、--huawei-phased-end、--huawei-phased-percent,
分阶段说明可用 --huawei-phased-description,缺省回退到更新说明。
iOS 新参数统一为 --app-version 和 --build-version;旧的 --version、--build
仍可使用。--bundle-id 可以自动反查 App Store Connect 数字 App ID。
退出码
| 退出码 | 含义 |
|---:|---|
| 0 | 成功 |
| 1 | 多渠道部分失败 |
| 2 | 全部失败或平台处理失败 |
| 3 | 参数错误 |
| 4 | 凭证缺失或无效 |
| 5 | 软件包缺失或无效 |
| 124 | 超时 |
生产使用前请阅读 SECURITY.md。
开发
npm run check
npm run security
npm test
npm run test:coverage
npm run pack:check
npm audit许可证:Zero-Clause BSD。
