File tree Expand file tree Collapse file tree 2 files changed +59
-1
lines changed Expand file tree Collapse file tree 2 files changed +59
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Build APK
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+
8+ jobs :
9+ apk :
10+ name : Generate APK
11+ needs : test
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v1
16+ - name : Setup JDK
17+ uses : actions/setup-java@v1
18+ with :
19+ java-version : 1.8
20+ - name : Build APK
21+ run : bash ./gradlew assembleDebug --stacktrace
22+ - name : Upload APK
23+ uses : actions/upload-artifact@v1
24+ with :
25+ name : apk
26+ path : app/build/outputs/apk/debug/app-debug.apk
27+ release :
28+ name : Release APK
29+ needs : apk
30+ if : startsWith(github.ref, 'refs/tags/v')
31+ runs-on : ubuntu-latest
32+ steps :
33+ - name : Download APK from build
34+ uses : actions/download-artifact@v1
35+ with :
36+ name : apk
37+ - name : Create Release
38+ id : create_release
39+ uses : actions/create-release@v1
40+ env :
41+ GITHUB_TOKEN : ${{ secrets.TOKEN }}
42+ with :
43+ tag_name : ${{ github.ref }}
44+ release_name : Release ${{ github.ref }}
45+ - name : Upload Release APK
46+ id : upload_release_asset
47+ uses : actions/upload-release-asset@v1.0.1
48+ env :
49+ GITHUB_TOKEN : ${{ secrets.TOKEN }}
50+ with :
51+ upload_url : ${{ steps.create_release.outputs.upload_url }}
52+ asset_path : apk/app-debug.apk
53+ asset_name : ChatGPTLite.apk
54+ asset_content_type : application/zip
Original file line number Diff line number Diff line change @@ -31,8 +31,12 @@ android {
3131
3232 buildTypes {
3333 release {
34- minifyEnabled false
3534 proguardFiles getDefaultProguardFile(' proguard-android-optimize.txt' ), ' proguard-rules.pro'
35+ debuggable false // make app non-debuggable
36+ crunchPngs true // shrink images
37+ minifyEnabled true // obfuscate code and remove unused code
38+ shrinkResources true // shrink and remove unused resources
39+ multiDexEnabled true
3640 }
3741 }
3842 compileOptions {
You can’t perform that action at this time.
0 commit comments