Skip to content

2024-08-10 10:14

2024-08-10 10:14 #17

Workflow file for this run

name: Android User Build
on: [push]
jobs:
build:
# runs-on: ubuntu-20.04
runs-on: ubuntu-latest
# env:
# ANDROID_SDK_TOOLS: "4333796"
# ANDROID_CMAKE: "3.10.2.4988404"
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
# - name: uninstall jdk
# run: sudo apt purge openjdk-*-jdk
# - name: reinstall
# run: sudo apt install openjdk-8-jdk
# - name: Install Android sdkmanager
# run: |
# wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip
# sudo unzip -d $ANDROID_HOME android-sdk.zip
# - name: Install required Android tools
# run: |
# echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager "cmake;${ANDROID_CMAKE}"
# echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --licenses
- name: Setting up the system environment
run: cp ./.github/workflows/github-action-only.jks ./app/keys.jks
- name: Install NDK
run: |
echo ${ANDROID_HOME}/cmdline-tools/latest/bin/
ls -tlh ${ANDROID_HOME}/cmdline-tools/latest/bin/
echo "y" | sudo sh ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;21.0.6113669"
- name: Build with Gradle
run: export KEYSTORE_PASS=000000000 && export ALIAS_NAME="key0" && export ALIAS_PASS=111111111 && export VERSION_CODE=1 && export VERSION_NAME="GITHUB-${GITHUB_SHA}" && ./gradlew app:copy_language_pack && ./gradlew assembleRelease
- name: Upload artifact
uses: actions/upload-artifact@master
with:
name: telegram-sms
path: app/build/outputs/apk/release/app-release.apk