Skip to content

Commit

Permalink
Workflow enhancement (#27)
Browse files Browse the repository at this point in the history
fix fragment + added signed release to gh + split apk
  • Loading branch information
nethical6 authored Jul 13, 2024
1 parent d78cc6a commit 61b5065
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 20 deletions.
36 changes: 30 additions & 6 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,38 @@ jobs:
- name: Build Lite Flavor with Gradle
run: ./gradlew assembleLiteDebug

- name: Upload Full Debug APK
uses: actions/upload-artifact@v2
- name: Upload Full Debug APK (arm64-v8a)
uses: actions/upload-artifact@v3
with:
name: full-debug-apk
path: app/build/outputs/apk/full/debug/app-full-debug.apk
name: full-debug-apk-arm64-v8a
path: app/build/outputs/apk/full/debug/app-full-arm64-v8a-debug.apk

- name: Upload Full Debug APK (armeabi-v7a)
uses: actions/upload-artifact@v3
with:
name: full-debug-apk-armeabi-v7a
path: app/build/outputs/apk/full/debug/app-full-armeabi-v7a-debug.apk

- name: Upload Full Debug APK (x86)
uses: actions/upload-artifact@v3
with:
name: full-debug-apk-x86
path: app/build/outputs/apk/full/debug/app-full-x86-debug.apk

- name: Upload Full Debug APK (x86_64)
uses: actions/upload-artifact@v3
with:
name: full-debug-apk-x86_64
path: app/build/outputs/apk/full/debug/app-full-x86_64-debug.apk

- name: Upload Full Debug APK (universal)
uses: actions/upload-artifact@v3
with:
name: full-debug-apk-universal
path: app/build/outputs/apk/full/debug/app-full-universal-debug.apk

- name: Upload Lite Debug APK
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: lite-debug-apk
path: app/build/outputs/apk/lite/debug/app-lite-debug.apk
path: app/build/outputs/apk/lite/debug/app-lite-universal-debug.apk
82 changes: 71 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,92 @@ jobs:
distribution: 'temurin'
java-version: '17'

- name: Build Full Release Bundle
run: ./gradlew bundleFullRelease
- name: Setup Android SDK
uses: android-actions/setup-android@v2

- name: Install Android Build Tools
run: sdkmanager "build-tools;29.0.3"

- name: Give permission to executable
run: chmod +x gradlew

- name: Build Full Release Bundle
run: ./gradlew bundleFullRelease

- name: Sign Bundle
uses: r0adkll/sign-android-release@v1
id: sign_bundle
with:
releaseDirectory: app/build/outputs/bundle/fullRelease
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}

- name: Build Full Release APK
run: ./gradlew assembleFullRelease

- name: Sign full variant Apks
uses: r0adkll/sign-android-release@v1
id: sign_app_full
with:
releaseDirectory: app/build/outputs/apk/full/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}

- name: Build Lite Release APK
run: ./gradlew assembleLiteRelease

- name: Upload Unsigned Full Release Bundle

- name: Sign lite variant Apk
uses: r0adkll/sign-android-release@v1
id: sign_app_lite
with:
releaseDirectory: app/build/outputs/apk/lite/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}


- name: Upload Full Release Bundle
uses: actions/upload-artifact@v4
with:
name: full-release-bundle
path: app/build/outputs/bundle/fullRelease/app-full-release.aab

- name: Upload Unsigned Full Release APK
uses: actions/upload-artifact@v4
- name: Upload Full Release APK (arm64-v8a)
uses: actions/upload-artifact@v3
with:
name: full-release-apk
path: app/build/outputs/apk/full/release/app-full-release-unsigned.apk
name: full-release-apk-arm64-v8a
path: app/build/outputs/apk/full/release/app-full-arm64-v8a-release-unsigned-signed.apk

- name: Upload Unsigned Lite Release APK
uses: actions/upload-artifact@v4
- name: Upload Full Release APK (armeabi-v7a)
uses: actions/upload-artifact@v3
with:
name: full-release-apk-armeabi-v7a
path: app/build/outputs/apk/full/release/app-full-armeabi-v7a-release-unsigned-signed.apk

- name: Upload Full Release APK (x86)
uses: actions/upload-artifact@v3
with:
name: full-release-apk-x86
path: app/build/outputs/apk/full/release/app-full-x86-release-unsigned-signed.apk

- name: Upload Full Release APK (x86_64)
uses: actions/upload-artifact@v3
with:
name: full-release-apk-x86_64
path: app/build/outputs/apk/full/release/app-full-x86_64-release-unsigned-signed.apk

- name: Upload Full Release APK (universal)
uses: actions/upload-artifact@v3
with:
name: full-release-apk-universal
path: app/build/outputs/apk/full/release/app-full-universal-release-unsigned-signed.apk

- name: Upload Lite Release APK
uses: actions/upload-artifact@v3
with:
name: lite-release-apk
path: app/build/outputs/apk/lite/release/app-lite-release-unsigned.apk
path: app/build/outputs/apk/lite/release/app-lite-universal-release-unsigned-signed.apk
11 changes: 9 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ plugins {
}

android {
compileSdk 34
compileSdk 33
namespace "nethical.digipaws"
flavorDimensions "version"

defaultConfig {
applicationId "nethical.digipaws"
minSdk 23
targetSdk 34
targetSdk 33
versionCode 2
versionName "Alpha-0.3"
}
Expand Down Expand Up @@ -45,6 +45,13 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures { buildConfig = true }
splits {
abi {
enable = true

universalApk = true
}
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx512m -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx1064m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Expand Down

0 comments on commit 61b5065

Please sign in to comment.