Skip to content

Commit 3994f05

Browse files
committed
MOPPAND-1700 Setup Github actions for Android and unit tests and App assemble.
1 parent ac9fbab commit 3994f05

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: RIA DigiDoc Android
2+
on: [push, pull_request]
3+
env:
4+
BUILD_NUMBER: ${{ github.run_number }}
5+
jobs:
6+
ubuntu:
7+
name: Build on Ubuntu
8+
if: contains(github.repository, 'open-eid/RIA-DigiDoc-Android') && contains(github.ref, 'main')
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
submodules: recursive
15+
- name: Setup environment
16+
env:
17+
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
18+
run: |
19+
echo "APP_VERSION_NAME=$(grep 'appVersionName=' gradle.properties | cut -d'=' -f 2 | cut -d'-' -f 1)" >> $GITHUB_ENV
20+
cd ${{ github.workspace }}/app
21+
echo -n "$GOOGLE_SERVICES_JSON" | base64 --decode > "google-services.json"
22+
- name: Setup JDK
23+
uses: actions/setup-java@v4
24+
with:
25+
distribution: zulu
26+
java-version: 17
27+
- name: Setup Gradle
28+
uses: gradle/actions/setup-gradle@v4
29+
- name: Test and Build with Gradle
30+
run: ./gradlew clean test createDebugCoverageReport --no-daemon fetchAndPackageDefaultConfiguration -PappVersionName=${{ env.APP_VERSION_NAME }}.${{ env.BUILD_NUMBER }} assembleRelease --info --quiet
31+

0 commit comments

Comments
 (0)