Skip to content

Commit 8c532cb

Browse files
committed
signingConfigs made conditional.
1 parent d70f1ad commit 8c532cb

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

.github/workflows/android-ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@ jobs:
5252
- name: Build with Gradle
5353
run: ./gradlew :mobile:bundleDebug
5454

55-
- name: 📦 Retain Artifacts (Lint Results)
56-
id: retain-lint-results
55+
- name: 📦 Retain Artifacts (Debug AAB)
56+
id: retain-debug-aab
5757
uses: actions/upload-artifact@v3
5858
with:
5959
name: androidx-github
60-
path: ./mobile/build/reports/*
60+
path: ./mobile/build/outputs/bundle/debug/*.aab
6161
retention-days: 14
6262

63-
- name: 📦 Retain Artifacts (Debug AAB)
64-
id: retain-debug-aab
63+
- name: 📦 Retain Artifacts (Lint Results)
64+
id: retain-lint-results
6565
uses: actions/upload-artifact@v3
6666
with:
6767
name: androidx-github
68-
path: ./mobile/build/outputs/bundle/debug/*.aab
69-
retention-days: 14
68+
path: ./mobile/build/reports/*
69+
retention-days: 14

mobile/build.gradle

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,19 @@ android {
4444
signingConfigs {
4545
debug {
4646
storeFile new File("${System.properties['user.home']}${File.separator}.android${File.separator}debug.keystore")
47-
storePassword rootProject.ext.get('debugKeystorePass')
48-
keyAlias rootProject.ext.get('debugKeyAlias')
49-
keyPassword rootProject.ext.get('debugKeyPass')
47+
if (rootProject.file('keystore.properties').exists()) {
48+
storePassword rootProject.ext.get('debugKeystorePass')
49+
keyAlias rootProject.ext.get('debugKeyAlias')
50+
keyPassword rootProject.ext.get('debugKeyPass')
51+
}
5052
}
5153
release {
5254
storeFile new File("${System.properties['user.home']}${File.separator}.android${File.separator}release.keystore")
53-
storePassword rootProject.ext.get('releaseKeystorePass')
54-
keyAlias rootProject.ext.get('releaseKeyAlias')
55-
keyPassword rootProject.ext.get('releaseKeyPass')
55+
if (rootProject.file('keystore.properties').exists()) {
56+
storePassword rootProject.ext.get('releaseKeystorePass')
57+
keyAlias rootProject.ext.get('releaseKeyAlias')
58+
keyPassword rootProject.ext.get('releaseKeyPass')
59+
}
5660
}
5761
}
5862

0 commit comments

Comments
 (0)