diff --git a/.github/workflows/build_debug_apk.yml b/.github/workflows/build_debug_apk.yml index f04c632b6a..098cf27ada 100644 --- a/.github/workflows/build_debug_apk.yml +++ b/.github/workflows/build_debug_apk.yml @@ -7,8 +7,19 @@ on: - 11-dev jobs: + send-start-notification: + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: Send start notification + uses: appleboy/telegram-action@v0.1.0 + with: + to: ${{ secrets.TELEGRAM_CI_CHANNEL_ID }} + token: ${{ secrets.TELEGRAM_CI_BOT_TOKEN }} + format: New push to
11-dev. Building debug APK… build-debug-apk: runs-on: ubuntu-latest + needs: send-start-notification continue-on-error: true steps: - name: Check out repository @@ -36,7 +47,7 @@ jobs: with: name: Debug APK path: build/outputs/apk/lawnWithQuickstep/debug/**.apk - send-notification: + send-end-notification: runs-on: ubuntu-latest needs: build-debug-apk steps: @@ -52,5 +63,4 @@ jobs: to: ${{ secrets.TELEGRAM_CI_CHANNEL_ID }} token: ${{ secrets.TELEGRAM_CI_BOT_TOKEN }} document: artifacts/debug-apk/**.apk - args: | - Build ${{ github.run_id }} finished with status ‘${{ env.WORKFLOW_CONCLUSION }}’. \ No newline at end of file + format: Build finished with status
${{ env.WORKFLOW_CONCLUSION }}. Uploading APK if available…
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 6640de5e34..549585d0d2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -46,6 +46,15 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.protobuf'
+final def commitHash = { ->
+ final def stdout = new ByteArrayOutputStream()
+ exec {
+ commandLine 'git', 'rev-parse', '--short=7', 'HEAD'
+ standardOutput = stdout
+ }
+ stdout.toString().trim()
+}
+
android {
compileSdkVersion COMPILE_SDK
buildToolsVersion BUILD_TOOLS_VERSION
@@ -54,7 +63,8 @@ android {
minSdkVersion 25
targetSdkVersion 30
versionCode 1
- versionName "1.0"
+ versionName "11.0-alpha.01+${commitHash()}"
+ setProperty("archivesBaseName", "Lawnchair-$versionName")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true