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:
|
||||
workflow_dispatch:
|
||||
|
|
@ -18,12 +18,21 @@ jobs:
|
|||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Build debug APK
|
||||
run: ./gradlew assembleDebug
|
||||
- name: Decode keystore
|
||||
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
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: helios-alarm-clock-debug
|
||||
path: app/build/outputs/apk/debug/*.apk
|
||||
path: app/build/outputs/apk/release/*.apk
|
||||
retention-days: 7
|
||||
|
|
|
|||
|
|
@ -26,10 +26,12 @@ android {
|
|||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
storeFile = file(System.getProperty("user.home") + "/.android/debug.keystore")
|
||||
storePassword = "android"
|
||||
keyAlias = "androiddebugkey"
|
||||
keyPassword = "android"
|
||||
val keystorePath = System.getenv("RELEASE_KEYSTORE_PATH")
|
||||
storeFile = if (keystorePath != null) file(keystorePath)
|
||||
else file(System.getProperty("user.home") + "/.android/debug.keystore")
|
||||
storePassword = System.getenv("RELEASE_KEYSTORE_PASS") ?: "android"
|
||||
keyAlias = System.getenv("RELEASE_KEY_ALIAS") ?: "androiddebugkey"
|
||||
keyPassword = System.getenv("RELEASE_KEY_PASS") ?: "android"
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue