Skip to content

Android Build/Upload to Play Store Console #267

Android Build/Upload to Play Store Console

Android Build/Upload to Play Store Console #267

Workflow file for this run

name: Android Build/Upload to Play Store Console
on:
push:
tags:
- mobile-**
jobs:
build:
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- name: Clear unused NDKs
run: |
ls -1 "$ANDROID_SDK_ROOT/ndk" |
awk '{
if (system("git grep " $0 " > /dev/null")) {
system("rm -rf '"$ANDROID_SDK_ROOT/ndk/"'" $0);
}
}'
- name: Delete all iOS simulators
run: xcrun simctl delete all
- name: Delete iOS simulator caches
run: sudo rm -rf ~/Library/Developer/CoreSimulator/Caches/*
- name: rustup target add aarch64-linux-android arm-linux-androideabi x86_64-linux-android
run: rustup target add aarch64-linux-android arm-linux-androideabi x86_64-linux-android
- name: Install Protobuf compiler
working-directory: ./scripts
run: sudo ./install_protobuf.sh
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Fix node-gyp
run: python -m pip install packaging setuptools
- name: yarn ci-cleaninstall
run: yarn ci-cleaninstall
- name: Save ALCHEMY_API_KEY to file
working-directory: ./native
env:
ALCHEMY_API_KEY: ${{secrets.ALCHEMY_API_KEY}}
run: mkdir -p facts && echo '{"key":"'"$ALCHEMY_API_KEY"'"}' > facts/alchemy.json
- name: Save NEYNAR_API_KEY to file
working-directory: ./native
env:
NEYNAR_API_KEY: ${{secrets.NEYNAR_API_KEY}}
run: mkdir -p facts && echo '{"key":"'"$NEYNAR_API_KEY"'"}' > facts/neynar.json
- name: Save ANDROID_KEY_STORE_B64 to file
env:
ANDROID_KEY_STORE_B64: ${{secrets.ANDROID_KEY_STORE_B64}}
run: echo "$ANDROID_KEY_STORE_B64" > ANDROID_KEY_STORE_B64.b64
- name: Save ANDROID_KEY_STORE to file
run: base64 -d -i ANDROID_KEY_STORE_B64.b64 -o android_key_store.keystore
- name: Configure gradle.properties
run: |
mkdir -p ~/.gradle
touch ~/.gradle/gradle.properties
echo "COMM_UPLOAD_STORE_FILE=$(pwd)/android_key_store.keystore" >> ~/.gradle/gradle.properties
echo "COMM_UPLOAD_KEY_ALIAS=AndroidSigningKey" >> ~/.gradle/gradle.properties
- name: Build with Gradle
working-directory: ./native/android
env:
ANDROID_SIGNING_PASSWORD: ${{secrets.ANDROID_SIGNING_PASSWORD}}
run: JAVA_HOME=${JAVA_HOME_11_arm64} ./gradlew bundleRelease
- name: Save PLAY_STORE_PUBLISHING_KEY to file
working-directory: ./native/android
env:
PLAY_STORE_PUBLISHING_KEY: ${{secrets.PLAY_STORE_PUBLISHING_KEY}}
run: echo "$PLAY_STORE_PUBLISHING_KEY" > PLAY_STORE_PUBLISHING_KEY.json
- name: Upload to Google Play
working-directory: ./native/android
run: node upload-aab.js