From e0f6e84aa7fbb74fddc93aa6bfccbe650ae99b11 Mon Sep 17 00:00:00 2001 From: Andre Weber Date: Fri, 8 Dec 2023 11:50:54 +0100 Subject: [PATCH] feature: Provide KUKSA Companion App in Build PR Pipeline Closes: #31 Signed-off-by: Andre Weber --- .github/workflows/build-pull-request.yaml | 32 ++++++++++++++++++- .../workflows/reusable-build-validation.yaml | 2 +- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-pull-request.yaml b/.github/workflows/build-pull-request.yaml index 9e6138f..95135b0 100755 --- a/.github/workflows/build-pull-request.yaml +++ b/.github/workflows/build-pull-request.yaml @@ -3,6 +3,36 @@ name: Validate pull request on: pull_request +env: + GPR_USERNAME: ${{ github.actor }} + GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: - build-project: + validate-project: uses: ./.github/workflows/reusable-build-validation.yaml + + build-project: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Project + uses: ./.github/actions/setup-project + + - name: Update Version + run: npm run bump-release # Updates the semantic version depending on the last commits e.g. feature / bugfix + + - 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 + + - name: Build 'assembleDebug' with Gradle Wrapper + run: ./gradlew assembleDebug + + - name: Archive .apk file + uses: actions/upload-artifact@v3 + with: + name: kuksa_companion_app.snapshot.apk + path: app/build/outputs/apk/debug/app-debug.apk + if-no-files-found: error + retention-days: 14 diff --git a/.github/workflows/reusable-build-validation.yaml b/.github/workflows/reusable-build-validation.yaml index 966de1d..3823eec 100755 --- a/.github/workflows/reusable-build-validation.yaml +++ b/.github/workflows/reusable-build-validation.yaml @@ -4,7 +4,7 @@ on: workflow_call: jobs: - build-project: + validate-project: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4