diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18fac29e19..3fb36d0498 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: echo ${{ secrets.KEYSTORE }} | base64 --decode > ${{ github.workspace }}/key.jks fi - name: Build debug APK - run: ./gradlew assembleLawnWithQuickstepGithubDebug assembleLawnWithQuickstepPlayDebug + run: ./gradlew assembleLawnWithQuickstepGithubDebug assembleLawnWithQuickstepPlayDebug assembleLawnWithQuickstepNightlyRelease - name: Upload artifact uses: actions/upload-artifact@v4 with: @@ -129,7 +129,7 @@ jobs: - name: Export APK_NAME for later use run: echo "APK_NAME=Lawnchair.Debug.${{ github.ref_name }}.Nightly-CI_${{ github.run_number }}-$(echo ${{ github.sha }} | cut -c1-7).apk" >> $GITHUB_ENV - name: Rename .apk file - run: mv "./Debug APK/lawnWithQuickstepGithub/debug/"*.apk "./$APK_NAME" + run: mv "./Debug APK/lawnWithQuickstepNightly/release/"*.apk "./$APK_NAME" - name: Delete release if exist then create release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.gradle b/build.gradle index 44bf15e708..e38b824b2e 100644 --- a/build.gradle +++ b/build.gradle @@ -210,6 +210,16 @@ android { buildTypes { all { signingConfig releaseSigning + + applicationVariants.configureEach { variant -> + variant.outputs.configureEach { + def channel = variant.productFlavors.last().name + // Override signingConfig to debug if the "nightly" flavor is selected + if (channel.any { it == "nightly" }) { + signingConfig = signingConfigs.debug + } + } + } pseudoLocalesEnabled true } @@ -253,6 +263,11 @@ android { dimension "channel" } + nightly { + applicationId 'app.lawnchair.nightly' + dimension "channel" + } + play { applicationId "app.lawnchair.play" dimension "channel" @@ -291,6 +306,10 @@ android { manifest.srcFile "quickstep/AndroidManifest-launcher.xml" } + lawnWithQuickstepNightly { + manifest.srcFile "quickstep/AndroidManifest-launcher.xml" + } + lawnWithQuickstepPlay { manifest.srcFile "quickstep/AndroidManifest-launcher.xml" }