Color PWM, PWM/Speed swap, Alexovik support improvements (#502) #2168
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/[email protected] | |
- name: Set up JAVA | |
uses: actions/[email protected] | |
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/[email protected] | |
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/[email protected] | |
with: | |
name: app-debug | |
path: app/build/outputs/apk/debug/app-debug.apk | |
- name: Get wearos APK | |
uses: actions/[email protected] | |
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 |