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
+
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 {
31
31
32
32
buildTypes {
33
33
release {
34
- minifyEnabled false
35
34
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
36
40
}
37
41
}
38
42
compileOptions {
You can’t perform that action at this time.
0 commit comments