ci: sign with consistent release keystore
This commit is contained in:
parent
ad602f48c3
commit
16ed756e4f
2 changed files with 19 additions and 8 deletions
17
.github/workflows/build-apk.yml
vendored
17
.github/workflows/build-apk.yml
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
name: Build Debug APK
|
name: Build Release APK
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
@ -18,12 +18,21 @@ jobs:
|
||||||
- name: Setup Android SDK
|
- name: Setup Android SDK
|
||||||
uses: android-actions/setup-android@v3
|
uses: android-actions/setup-android@v3
|
||||||
|
|
||||||
- name: Build debug APK
|
- name: Decode keystore
|
||||||
run: ./gradlew assembleDebug
|
run: |
|
||||||
|
echo "${{ secrets.RELEASE_KEYSTORE_B64 }}" | base64 -d > $RUNNER_TEMP/helios-release.jks
|
||||||
|
|
||||||
|
- name: Build release APK
|
||||||
|
env:
|
||||||
|
RELEASE_KEYSTORE_PATH: ${{ runner.temp }}/helios-release.jks
|
||||||
|
RELEASE_KEYSTORE_PASS: ${{ secrets.RELEASE_KEYSTORE_PASS }}
|
||||||
|
RELEASE_KEY_ALIAS: helios
|
||||||
|
RELEASE_KEY_PASS: ${{ secrets.RELEASE_KEYSTORE_PASS }}
|
||||||
|
run: ./gradlew assembleRelease
|
||||||
|
|
||||||
- name: Upload APK
|
- name: Upload APK
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: helios-alarm-clock-debug
|
name: helios-alarm-clock-debug
|
||||||
path: app/build/outputs/apk/debug/*.apk
|
path: app/build/outputs/apk/release/*.apk
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,12 @@ android {
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
create("release") {
|
create("release") {
|
||||||
storeFile = file(System.getProperty("user.home") + "/.android/debug.keystore")
|
val keystorePath = System.getenv("RELEASE_KEYSTORE_PATH")
|
||||||
storePassword = "android"
|
storeFile = if (keystorePath != null) file(keystorePath)
|
||||||
keyAlias = "androiddebugkey"
|
else file(System.getProperty("user.home") + "/.android/debug.keystore")
|
||||||
keyPassword = "android"
|
storePassword = System.getenv("RELEASE_KEYSTORE_PASS") ?: "android"
|
||||||
|
keyAlias = System.getenv("RELEASE_KEY_ALIAS") ?: "androiddebugkey"
|
||||||
|
keyPassword = System.getenv("RELEASE_KEY_PASS") ?: "android"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue