Skip to content

Commit

Permalink
chore: Archive APK in Pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
wba2hi committed Dec 5, 2023
1 parent fa49aae commit 67fb356
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- uses: ./.github/actions/create-release-apk
with:
keystore: ${{ secrets.KEYSTORE_RELEASE }}
keystore: ${{ secrets.KEYSTORE_DEBUG }}
key_alias: ${{ secrets.SIGNING_KEY_ALIAS }}
key_password: ${{ secrets.SIGNING_KEY_PASSWORD }}
store_password: ${{ secrets.SIGNING_STORE_PASSWORD }}
Expand Down
31 changes: 30 additions & 1 deletion .github/workflows/build-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,35 @@ name: Validate pull request
on:
pull_request

env:
GPR_USERNAME: ${{ github.actor }}
GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build-project:
validate-build:
uses: ./.github/workflows/reusable-build-validation.yaml

build-project:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/setup-project

- name: Set Snapshot Version
run: ./gradlew setSnapshotVersion # Do not chain this command because it writes into a file which needs to be re-read inside the next gradle command

- uses: ./.github/actions/create-release-apk
with:
keystore: ${{ secrets.KEYSTORE_DEBUG }}
key_alias: ${{ secrets.SIGNING_KEY_ALIAS }}
key_password: ${{ secrets.SIGNING_KEY_PASSWORD }}
store_password: ${{ secrets.SIGNING_STORE_PASSWORD }}

- name: Archive .apk file
uses: actions/upload-artifact@v3
with:
name: "kuksa_companion_app.pr.apk"
path: app/build/outputs/apk/release/app-release.apk
if-no-files-found: error
retention-days: 14
2 changes: 1 addition & 1 deletion .github/workflows/reusable-build-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:

jobs:
build-project:
validate-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {
id("com.google.devtools.ksp")
alias(libs.plugins.kotlin.serialization)
kotlin("kapt")
id("com.google.dagger.hilt.android")
alias(libs.plugins.hilt.android)
kotlin("android")
}

Expand All @@ -36,8 +36,8 @@ android {
applicationId = "org.eclipse.kuksa.companion"
minSdk = 27
targetSdk = 33
versionCode = 1
versionName = "1.0"
versionCode = rootProject.extra["projectVersionCode"].toString().toInt()
versionName = rootProject.extra["projectVersion"].toString()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down

0 comments on commit 67fb356

Please sign in to comment.