diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ac418a..0a50c5e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -88,4 +88,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: app - path: ${{ steps.get_path.outputs.file_path }}/风月读书${{ steps.config.outputs.version_name }}.apk \ No newline at end of file + path: ${{ steps.get_path.outputs.file_path }}/风月读书*.apk \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index b34d0c1..4adf40e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -111,8 +111,13 @@ android { } } android.applicationVariants.all { variant -> + def buildType = variant.buildType.name + def fileName = "${name}v${defaultConfig.versionName}.apk" + if (buildType == "debug"){ + fileName = "${name}v${defaultConfig.versionName}-${commitId}.apk" + } variant.outputs.all { - outputFileName = "${name}v${defaultConfig.versionName}.apk" + outputFileName = fileName } /*variant.outputs.each { output -> def abi = output.getFilter(OutputFile.ABI)