sdk 35 + lib updates #2183
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Java project with Gradle | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: Gradle CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, reopened, synchronize] | |
jobs: | |
gradle-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2.5.0 | |
- name: Set up JAVA | |
uses: actions/setup-java@v3.6.0 | |
with: | |
distribution: 'temurin' # See 'Supported distributions' for available options | |
java-version: '17' | |
cache: 'gradle' | |
check-latest: true | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Cache Gradle packages | |
uses: actions/cache@v3.0.11 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Test | |
run: ./gradlew test | |
- name: Assemble | |
run: ./gradlew assembleDebug -Dec_accessToken="${{ secrets.EC_TOKEN }}" -Dmetrica_api="${{ secrets.METRICA_API }}" | |
- name: Cleanup Gradle Cache | |
run: | | |
rm -f ~/.gradle/caches/modules-2/modules-2.lock | |
rm -f ~/.gradle/caches/modules-2/gc.properties | |
- name: Get APK | |
uses: actions/upload-artifact@v3.1.1 | |
with: | |
name: app-debug | |
path: app/build/outputs/apk/debug/app-debug.apk | |
- name: Get wearos APK | |
uses: actions/upload-artifact@v3.1.1 | |
with: | |
name: wearos-debug | |
path: wearos/build/outputs/apk/debug/wearos-debug.apk | |
- name: Send apk to telegram | |
env: | |
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }} | |
if: github.event_name == 'pull_request' && env.TELEGRAM_TOKEN != '' | |
uses: appleboy/telegram-action@master | |
with: | |
to: ${{ secrets.TELEGRAM_TO }} | |
token: env.TELEGRAM_TOKEN | |
message: | | |
${{ github.event.pull_request.title }} | |
${{ github.base_ref }} <= ${{ github.head_ref }} | |
PR: https://github.com/Wheellog/Wheellog.Android/pull/${{github.event.number}} | |
document: app/build/outputs/apk/debug/app-debug.apk |