feat : add nightly build sign (#5095)

- closes : #4857
This commit is contained in:
John Andrew Camu
2024-12-18 19:30:47 +08:00
committed by GitHub
parent c150036fd5
commit df6c0294da
2 changed files with 21 additions and 2 deletions

View File

@@ -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 }}

View File

@@ -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"
}