Skip to content

2024-08-13 10:38

2024-08-13 10:38 #35

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@v3
# with:
# submodules: 'true'
- name: set up JDK
uses: actions/setup-java@v3
with:
java-version: "17"
# distribution: 'oracle'
# - 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: |
# 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: run Gradle test
run: ./gradlew test
- name: Build gradle project
run: ./gradlew build
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582
- name: check java
run: |
which java
java -h
java -version
- name: check environment
run: |
echo ${ANDROID_HOME}
echo ${JAVA_HOME}
echo ${GITHUB_SHA}
# - name: check gradle
# run: |
# ./gradlew -h
# ./gradlew --version
# ./gradlew assembleDebug --info
# # sudo git update-index --chmod=+x gradlew
# # sudo chmod a=rwx gradlew
# # sudo git config --global user.name 'vomw'
# # sudo git config --global user.email '22770640+vomw@users.noreply.github.com'
# # sudo git status
# # sudo git diff
# # sudo git add gradlew
# # sudo git commit -m "upadte permission"
# # sudo git push
- 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