Skip to content

Commit a61d6d8

Browse files
added pro (#765)
* added pro * feat: minor improvements * feat: improvements * feat: improvements * feat: improvements
1 parent 54882c5 commit a61d6d8

File tree

6 files changed

+93
-16
lines changed

6 files changed

+93
-16
lines changed

.github/workflows/generate-aab-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs:
2727

2828
- name: Build Release AAB
2929
id: buildRelease
30-
run: ./gradlew bundleRelease
30+
run: ./gradlew bundleFreeRelease
3131

3232
- name: Sign AAB
3333
id: sign
3434
uses: r0adkll/sign-android-release@fix/bundle-signing
3535
with:
36-
releaseDirectory: app/build/outputs/bundle/release
36+
releaseDirectory: app/build/outputs/bundle/freeRelease
3737
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
3838
alias: ${{ secrets.ALIAS }}
3939
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
@@ -43,5 +43,5 @@ jobs:
4343
uses: actions/upload-artifact@v4
4444
with:
4545
name: app
46-
path: app/build/outputs/bundle/release/*.aab
46+
path: app/build/outputs/bundle/freeRelease/*.aab
4747
retention-days: 3
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Generate AAB File
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
ref:
7+
description: 'Reference branch, tag, commit id'
8+
required: true
9+
type: string
10+
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
17+
- uses: actions/checkout@v4
18+
with:
19+
ref: ${{ inputs.ref }}
20+
21+
- name: Setting up project
22+
uses: ./.github/actions/setup
23+
24+
- name: Build with Gradle
25+
id: build
26+
run: ./gradlew build
27+
28+
- name: Build Release AAB
29+
id: buildRelease
30+
run: ./gradlew bundleProRelease
31+
32+
- name: Sign AAB
33+
id: sign
34+
uses: r0adkll/sign-android-release@fix/bundle-signing
35+
with:
36+
releaseDirectory: app/build/outputs/bundle/proRelease
37+
signingKeyBase64: ${{ secrets.SIGNING_KEY_WITH_PRO }}
38+
alias: pro
39+
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
40+
keyPassword: ${{ secrets.KEY_PASSWORD }}
41+
42+
- name: 🚀 Upload APK to Artifacts 📱
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: app
46+
path: app/build/outputs/bundle/proRelease/*.aab
47+
retention-days: 3

.github/workflows/master-apk-create.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: ./.github/actions/setup
2626

2727
- name: Build APK ⚙️🛠
28-
run: bash ./gradlew assembleDebug
28+
run: bash ./gradlew assembleFreeDebug
2929

3030

3131
- uses: "marvinpinto/action-automatic-releases@latest"
@@ -34,4 +34,4 @@ jobs:
3434
automatic_release_tag: "latest-master"
3535
prerelease: true
3636
title: "Staging Build"
37-
files: app/build/outputs/apk/debug/*.apk
37+
files: app/build/outputs/apk/*/*.apk

.github/workflows/pr-check.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131
run: ./gradlew test
3232

3333
- name: 🏗 Build APK
34-
run: bash ./gradlew assembleDebug
34+
run: bash ./gradlew assembleFreeDebug
3535

3636
- name: 🚀 Upload APK to Artifacts 📱
3737
uses: actions/upload-artifact@v4
3838
with:
3939
name: app
40-
path: app/build/outputs/apk/debug/*.apk
40+
path: app/build/outputs/apk/free/debug/*.apk
4141
retention-days: 3

.github/workflows/production.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,33 +21,53 @@ jobs:
2121
id: build
2222
run: ./gradlew build
2323

24-
- name: Build Release AAB
24+
- name: Build Free and Pro Release AAB
2525
id: buildRelease
2626
run: ./gradlew bundleRelease
2727

28-
- name: Sign AAB
28+
- name: Sign Free AAB
2929
id: sign
3030
uses: r0adkll/sign-android-release@fix/bundle-signing
3131
with:
32-
releaseDirectory: app/build/outputs/bundle/release
33-
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
32+
releaseDirectory: app/build/outputs/bundle/freeRelease
33+
signingKeyBase64: ${{ secrets.SIGNING_KEY_WITH_PRO }}
3434
alias: ${{ secrets.ALIAS }}
3535
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
3636
keyPassword: ${{ secrets.KEY_PASSWORD }}
3737

38+
- name: Sign Pro AAB
39+
id: sign
40+
uses: r0adkll/sign-android-release@fix/bundle-signing
41+
with:
42+
releaseDirectory: app/build/outputs/bundle/proRelease
43+
signingKeyBase64: ${{ secrets.SIGNING_KEY_WITH_PRO }}
44+
alias: pro
45+
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
46+
keyPassword: ${{ secrets.KEY_PASSWORD }}
47+
3848
- name: Create service_account.json
3949
id: createServiceAccount
4050
run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json
41-
42-
4351

44-
- name: Deploy to Play Store (PROD)
45-
id: deployProd
52+
- name: Deploy Free to Play Store (PROD)
53+
id: deployFreeProd
4654
uses: r0adkll/upload-google-play@v1.1.3
4755
with:
4856
serviceAccountJson: service_account.json
4957
packageName: com.yogeshpaliyal.keypass
50-
releaseFiles: app/build/outputs/bundle/release/*.aab
58+
releaseFiles: app/build/outputs/bundle/freeRelease/*.aab
59+
track: production
60+
userFraction: 0.01
61+
status: inProgress
62+
whatsNewDirectory: whatsnew/
63+
64+
- name: Deploy Pro to Play Store (PROD)
65+
id: deployProProd
66+
uses: r0adkll/upload-google-play@v1.1.3
67+
with:
68+
serviceAccountJson: service_account.json
69+
packageName: com.yogeshpaliyal.keypass.pro
70+
releaseFiles: app/build/outputs/bundle/proRelease/*.aab
5171
track: production
5272
userFraction: 0.01
5373
status: inProgress

app/build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ android {
4242
}
4343

4444
}
45+
46+
productFlavors {
47+
create("free") {
48+
isDefault=true
49+
}
50+
create("pro") {
51+
applicationIdSuffix = ".pro"
52+
}
53+
}
54+
4555
compileOptions {
4656
sourceCompatibility = JavaVersion.VERSION_17
4757
targetCompatibility = JavaVersion.VERSION_17

0 commit comments

Comments
 (0)