File tree Expand file tree Collapse file tree 3 files changed +66
-1
lines changed
build-logic/convention/src/main/kotlin Expand file tree Collapse file tree 3 files changed +66
-1
lines changed Original file line number Diff line number Diff line change 1+ name : android-cd
2+ on :
3+ push :
4+ tags :
5+ - ' release*'
6+ workflow_dispatch :
7+
8+ jobs :
9+ build :
10+ runs-on : macos-latest
11+
12+ steps :
13+ - uses : actions/checkout@v2
14+
15+ - name : Create Google Services JSON File
16+ env :
17+ GOOGLE_SERVICES_JSON : ${{ secrets.GOOGLE_SERVICES_JSON }}
18+ run : |
19+ echo "$GOOGLE_SERVICES_JSON" > google-services.json.b64
20+ base64 -d -i google-services.json.b64 > ./app/google-services.json
21+
22+ - name : Create LocalProperites
23+ env :
24+ GOOGLE_CLIENT_ID : ${{ secrets.GOOGLE_CLIENT_ID }}
25+ TUK_BASE_URL : ${{ secrets.TUK_BASE_URL }}
26+ run : |
27+ echo GOOGLE_CLIENT_ID=\"GOOGLE_CLIENT_ID\" > ./local.properties
28+ echo TUK_BASE_URL=\"TUK_BASE_URL\" >> ./local.properties
29+
30+
31+ - name : Grant execute permission for gradlew
32+ run : chmod +x gradlew
33+
34+ - name : Build apk
35+ run : ./gradlew assembleProductionRelease
36+
37+ - name : Sign app APK
38+ uses : r0adkll/sign-android-release@v1
39+ # ID used to access action output
40+ id : sign_app
41+ with :
42+ releaseDirectory : app/build/outputs/apk/production/release
43+ signingKeyBase64 : ${{ secrets.KEYSTORE_BASE64 }}
44+ alias : ${{ secrets.KEYSTORE_ALIAS }}
45+ keyStorePassword : ${{ secrets.KEYSTORE_PASSWORD }}
46+ keyPassword : ${{ secrets.KEYSTORE_PASSWORD }}
47+ env :
48+ # override default build-tools version (29.0.3) -- optional
49+ BUILD_TOOLS_VERSION : " 34.0.0"
50+
51+ - name : Upload .aab as artifact
52+ uses : actions/upload-artifact@v4
53+ with :
54+ name : app-bundle
55+ path : ${{steps.sign_app.outputs.signedReleaseFile}}
Original file line number Diff line number Diff line change @@ -171,4 +171,5 @@ google-services.json
171171/.idea /other.xml
172172/.idea /kotlinc.xml
173173
174- .b64
174+ * .b64
175+ * .jks
Original file line number Diff line number Diff line change @@ -21,7 +21,16 @@ class AndroidApplicationConventionPlugin: Plugin<Project> {
2121 configureDefaultConfig()
2222
2323 buildTypes {
24+ getByName(" debug" ) {
25+ isDebuggable = true
26+ isMinifyEnabled = false
27+ signingConfig = signingConfigs.getByName(" debug" )
28+ }
2429 getByName(" release" ) {
30+ isDebuggable = false
31+ isMinifyEnabled = true
32+ isShrinkResources = true
33+
2534 proguardFiles(
2635 getDefaultProguardFile(" proguard-android-optimize.txt" ),
2736 " proguard-rules.pro"
You can’t perform that action at this time.
0 commit comments