CommunityProductivity & Collaborationgithub.com

AngChow/android-publish

End-to-end automation for Android app packaging and submission review: pre-check → build → Bugly symbol upload → multi-channel submission (Tencent MyApp/Xiaomi/Huawei/OPPO/vivo) → Git tag.

What is android-publish?

This Codex skill fully automates the Android release packaging and multi-channel app store submission workflow. It streamlines five key phases: pre-check (signing config and version validation), building (assembles a 64-bit release APK), Bugly symbol table upload (non-blocking), sequential submission to China's top five Android app stores (Tencent MyApp, Xiaomi, Huawei, OPPO, vivo) with their unique authentication and API constraints, and finally Git tagging on success. It supports dry-run only for Tencent MyApp, per-channel execution, and skippable steps for build, Bugly, Git, or checks. A safety lock requires both a CLI flag and environment variable to prevent accidental production submissions. The skill is intended for developers using Codex who need a one-command pipeline to repeatedly release Android apps to multiple Chinese app markets while ensuring crash symbolization and version traceability.

Works with~Claude Code✓Codex CLI~Cursor
npx skills add AngChow/android-publish

Installed? Explore more Productivity & Collaboration skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

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).

Related Skills