diff --git a/.github/workflows/android_ci.yml b/.github/workflows/android_ci.yml index 22b52ceb9..1cb35c70a 100644 --- a/.github/workflows/android_ci.yml +++ b/.github/workflows/android_ci.yml @@ -1,59 +1,58 @@ name: Android Build CI on: push: branches: [master] paths-ignore: - 'landing/**' - 'web/**' - 'docs/**' - 'keyserver/**' pull_request: types: [opened, reopened] jobs: build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: set up JDK 11 uses: actions/setup-java@v2 with: java-version: '11' distribution: 'adopt' - name: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android run: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android - - name: Install Protobuf compiler - working-directory: ./scripts - run: ./install_protobuf.sh + - name: sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install -y protobuf-compiler + run: sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install -y protobuf-compiler - name: Install Yarn run: npm install -g yarn - name: yarn --frozen-lockfile --network-timeout 180000 run: yarn --frozen-lockfile --network-timeout 180000 - 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 ANDROID_KEY_STORE_B64.b64 > android_key_store.keystore - name: Configure gradle.properties run: | mkdir ~/.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: ./gradlew bundleRelease diff --git a/.github/workflows/android_release.yml b/.github/workflows/android_release.yml index 133e4092c..497f62624 100644 --- a/.github/workflows/android_release.yml +++ b/.github/workflows/android_release.yml @@ -1,61 +1,60 @@ name: Android Build/Upload to Play Store Console on: release: types: [published] jobs: build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: set up JDK 11 uses: actions/setup-java@v2 with: java-version: '11' distribution: 'adopt' - name: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android run: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android - - name: Install Protobuf compiler - working-directory: ./scripts - run: ./install_protobuf.sh + - name: sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install -y protobuf-compiler + run: sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install -y protobuf-compiler - name: Install Yarn run: npm install -g yarn - name: yarn --frozen-lockfile --network-timeout 180000 run: yarn --frozen-lockfile --network-timeout 180000 - 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 ANDROID_KEY_STORE_B64.b64 > android_key_store.keystore - name: Configure gradle.properties run: | mkdir ~/.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: ./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