应用出海

Google/华为市场的发布

Posted by River on June 25, 2025

前言

当前国内互联网企业纷纷扩张海外业务,本文将介绍如何将app发布至Google play或者华为应用市场。

1、用Bitrise构建应用发布到Google play

以下是部分核心脚本

- gradle-runner@2.0:
inputs:
- gradle_task: bundleGoogleProdRelease
is_always_run: true
- android-build@1:
inputs:
- module: "$MODULE"
- variant: "$PL_VARIANT_GOOGLE_PROD_RELEASE"
- project_location: "$PROJECT_LOCATION"
- android-build@1:
inputs:
- module: "$MODULE"
- variant: "$PL_VARIANT_GOOGLE_PROD_RELEASE"
- build_type: aab
- project_location: "$PROJECT_LOCATION"
- sign-apk@1:
inputs:
- debuggable_permitted: 'false'
- use_apk_signer: 'true'
- signer_scheme: v4
- android_app: "$BITRISE_APK_PATH|$BITRISE_AAB_PATH"
- google-play-deploy@3:
inputs:
- service_account_json_key_path: "$BITRISEIO_SERVICE_ACCOUNT_JSON_URL"
- track: internal
- app_path: "$BITRISE_SIGNED_AAB_PATH"
- retry_without_sending_to_review: 'true'
- package_name: asia.coins.mobile
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x

# write your script here
echo "Removing temporary build files"
find . -name "XXX-xxx-mapping*.txt" -type f -delete
find . -name "XXX-prod-release*.aab" -type f -delete
find . -name "XXX-xxx-prod-release.a*" -type f -delete
- working_dir: "$BITRISE_DEPLOY_DIR"
- is_debug: 'yes'
- deploy-to-bitrise-io@2:
inputs:
- generate_universal_apk_if_none: 'false'
- cache-push@2: {}
envs:
- ANDROID_KEYSTORE_URL: "$HOME/keystores/upload.jks"
- APP_PACKAGE_NAME: xxx.xxx.mobile
- GRADLE_BUILD_FILE_PATH: XXX/build.gradle
opts:
is_expand: false
- opts:
is_expand: false
GRADLEW_PATH: XXX/gradlew
- opts:
is_expand: false
PL_VARIANT_GOOGLE_PROD_RELEASE: GoogleProdRelease
description: ''

登录google play console,按下流程操作即可。

发布google play-1 发布google play-2 发布google play-3 发布google play-4 发布google play-5 发布google play-6 发布google play-7 发布google play-8

这里是提审最后一步,或者审核通过后开始正式灰度发布。 发布google play-8

2、用Bitrise构建应用发布到华为应用市场

以下是部分核心脚本

- gradle-runner@2.0:
inputs:
- gradle_task: bundleHuaweiProdRelease
is_always_run: true
- android-build@1:
inputs:
- module: "$MODULE"
- variant: "$PL_VARIANT_HUAWEI_PROD_RELEASE"
- project_location: "$PROJECT_LOCATION"
- android-build@1:
inputs:
- module: "$MODULE"
- variant: "$PL_VARIANT_HUAWEI_PROD_RELEASE"
- build_type: aab
- project_location: "$PROJECT_LOCATION"
- sign-apk@1:
inputs:
- debuggable_permitted: 'false'
- use_apk_signer: 'true'
- signer_scheme: v4
- android_app: "$BITRISE_APK_PATH|$BITRISE_AAB_PATH"
- appgallery-deploy@1.5:
is_always_run: false
inputs:
- huawei_client_id: '620185827xxxxxx'
- huawei_client_secret: "$HUAWEI_APP_GALLERY_API_KEY"
- release_type: By Phase
- submit_for_review: 'false'
- phase_release_percentage: '1'
- phase_release_description: 1% of users
- file_path: "$BITRISE_SIGNED_AAB_PATH"
- huawei_filename: app_release_${BITRISE_BUILD_NUMBER}.aab
- huawei_app_id: 100996255
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x

# write your script here
echo "Removing temporary build files"
find . -name "XXX-xxx-mapping*.txt" -type f -delete
find . -name "XXX-prod-release*.aab" -type f -delete
find . -name "XXX-xxx-prod-release.a*" -type f -delete
- working_dir: "$BITRISE_DEPLOY_DIR"
- is_debug: 'yes'
- deploy-to-bitrise-io@2:
inputs:
- generate_universal_apk_if_none: 'false'
- cache-push@2: {}
envs:
- ANDROID_KEYSTORE_URL: "$HOME/keystores/upload.jks"
- APP_PACKAGE_NAME: xxx.xxx.xxx
- GRADLE_BUILD_FILE_PATH: XXX/build.gradle
opts:
is_expand: false
- opts:
is_expand: false
GRADLEW_PATH: XXX/gradlew
- opts:
is_expand: false
PL_VARIANT_HUAWEI_PROD_RELEASE: HuaweiProdRelease
description: ''

登录华为应该市场,按下流程操作即可

找到App information,输入更新的信息;然后一直填写下一步。 华为市场-1

总结

工作中老板以及同事觉得你做得好,比你真实做的怎么样更加重要。