Community生产力与协作github.com

AngChow/android-publish

Android 应用打包提审全流程自动化 Codex Skill:预检查 -> 打包 -> Bugly 符号表上传 -> 多渠道提审(应用宝/小米/华为/OPPO/vivo) -> Git 打 tag

android-publish 是什么?

android-publish is a Codex agent skill that android 应用打包提审全流程自动化 Codex Skill:预检查 -> 打包 -> Bugly 符号表上传 -> 多渠道提审(应用宝/小米/华为/OPPO/vivo) -> Git 打 tag.

兼容平台~Claude Code✓Codex CLI~Cursor
npx skills add AngChow/android-publish

Installed? Explore more 生产力与协作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Android App Publishing Skill

Build a release APK and submit it to the five major Android app stores (Tencent MyApp / Xiaomi / Huawei / OPPO / vivo) for review – fully end-to-end automated.

Execution Instructions

When the user requests "package and submit" (or "build release" / "publish" / "distribute app" / "multi-channel submission", etc.):

  1. Confirm update description: If not specified by the user, use the default "Fixed known issues, optimized user experience", or ask the user.
  2. Execute the all-in-one command:
    PUBLISH_CONFIRM_SUBMIT=YES python3 ~/.codex/skills/android-publish/scripts/build_and_submit.py \
        --i-know-this-submits-to-production \
        --update-desc "<update description>" \
        <project root>
    
  3. Monitor output: The script completes all steps automatically (pre-check → build → Bugly → multi-channel submission → Git tag), no manual intervention required.
  4. Report results: Summarize the success/failure status of each channel to the user.
  5. Error handling: If pre-check fails (signing / version number), stop and inform the user of the specific reason; failure on one channel does not affect other channels.

Build Only Without Submission (Dry-Run)

Only Tencent MyApp supports dry-run (upload without submitting for review). Xiaomi / Huawei / OPPO / vivo submit immediately upon upload, so dry-run skips them automatically:

python3 ~/.codex/skills/android-publish/scripts/build_and_submit.py \
    --dry-run --store yyb \
    <project root>

Specify a Single Channel

PUBLISH_CONFIRM_SUBMIT=YES python3 ~/.codex/skills/android-publish/scripts/build_and_submit.py \
    --store yyb|xiaomi|huawei|oppo|vivo \
    --i-know-this-submits-to-production \
    --update-desc "<update description>" \
    <project root>

Skip Steps

  • --skip-build: Skip building and use an existing APK
  • --skip-bugly: Skip Bugly symbol table upload
  • --skip-git: Skip Git tagging
  • --skip-check: Skip pre-check

Automation Flow

StepScriptDescription
Step 0 Pre-checkpre_check.pyVerify release signing config is signingConfigs.release + local versionCode > online version number
Step 1 Build./gradlew clean assembleReleaseLocate app-arm64-v8a-release.apk (only upload 64-bit packages)
Step 1.5 Buglyupload_bugly_symbol.pyUpload mapping.txt (non-blocking; failure does not affect submission)
Step 2 Multi-channel submissionPer-channel *_submit.pyUpload to each configured channel sequentially, with independent safety locks
Step 3 Git taggit_tag.pyAfter all succeed, merge to master + create version tag + push

Supported Channels

ChannelIdentifierSigning MethodDry-RunAPI Limits
Tencent MyAppyybHmacSHA256Supported100 uploads/day, 50 updates/day
Xiaomi App StorexiaomiRSA (X.509 certificate)Not supported (upload = submit)None
Huawei AppGalleryhuaweiOAuth2 (API Client)Not supportedNone
OPPO App MarketoppoHmacSHA256Not supported50 requests/day/API
vivo App StorevivoHmacSHA256Not supported50 requests/day/API

All channels support Chinese update descriptions passed uniformly via --update-desc. Huawei additionally sets a user-visible newFeatures field.

Safety Lock

Submitting for review is a write operation on the live environment and requires both:

  • The --i-know-this-submits-to-production command line flag
  • The environment variable PUBLISH_CONFIRM_SUBMIT=YES (for multi-channel) or the corresponding per-channel variable

build_and_submit.py automatically sets the appropriate environment variables for child processes when --confirm is used, so you only need to set PUBLISH_CONFIRM_SUBMIT=YES.

Channel Characteristics

  • Tencent MyApp: Upload and submission are separate; supports dry-run. Limits: 100 uploads/day, 50 updates/day.
  • Xiaomi: Upload triggers immediate submission; only needs APK + updateDesc. No API limits.
  • Huawei: Token → upload to OBS → update file info → update language info (update description) → wait 2 minutes → submit. Team-level credentials are shared across apps.
  • OPPO: The publish API has many fields, but automatically reuses existing values from query results. Limit: 50 requests/day/API.
  • vivo: Uploading APK returns a transaction ID + versionCode; the update API requires few mandatory fields. Limit: 50 requests/day/API.

Prerequisites

  1. Each app store must have the app registered and successfully published online.
  2. The project root must contain .publish_env (already in .gitignore) with credentials for each channel.
  3. The Xiaomi public key certificate file must be placed in the project root directory and added to .gitignore.
  4. The local machine must have Python 3.8+, requests, pycryptodome, and cryptography.
  5. The project root must contain gradlew with Java / Android SDK configured.

Single Channel Operations

Each channel supports independent query and submission. See README.md for details.

Bugly Symbol Table

After building, mapping.txt is automatically uploaded to Bugly (non-blocking) to ensure crash stack traces can be deobfuscated. The jar tool is bundled in the skill's tools/ directory; credentials are read from .publish_env (BUGLY_APP_ID / BUGLY_APP_KEY).

相关技能