Skip to content

Commit

Permalink
Added release signing config
Browse files Browse the repository at this point in the history
  • Loading branch information
sirekanian committed Aug 24, 2023
1 parent 4dfba6b commit d4ef595
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,15 @@ jobs:
distribution: 'temurin'
java-version: '17'
- shell: bash
run: ./gradlew assembleRelease
- shell: bash
run: ./gradlew bundleRelease
env:
SIGNING_KEYSTORE_FILE: release.keystore
SIGNING_KEYSTORE_BASE64: ${{ secrets.SIGNING_KEYSTORE_BASE64 }}
SIGNING_KEYSTORE_PASSWORD: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }}
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
run: |
base64 --decode <<< "$SIGNING_KEYSTORE_BASE64" > app/release.keystore
./gradlew assembleRelease bundleRelease -PsigningConfig=release
- if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
Expand Down
9 changes: 8 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ android {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard.pro")
signingConfig = signingConfigs.getByName("debug")
if (findProperty("signingConfig") == "release") {
signingConfig = signingConfigs.create("release") {
storeFile(file(System.getenv("SIGNING_KEYSTORE_FILE")))
storePassword(System.getenv("SIGNING_KEYSTORE_PASSWORD"))
keyAlias(System.getenv("SIGNING_KEY_ALIAS"))
keyPassword(System.getenv("SIGNING_KEY_PASSWORD"))
}
}
}
}
compileOptions {
Expand Down

0 comments on commit d4ef595

Please sign in to comment.