-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (37 loc) · 1.17 KB
/
android-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build Android app
on:
pull_request:
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v4
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y.%m')"
- name: Build app bundle
run: |
./gradlew bundleQa \
"-PexternalVersionName=pr-${{ steps.date.outputs.date }}-${{ github.event.pull_request.number }}-${{ github.sha }}"
- name: Run linter
run: ./gradlew lint
- name: Run unit tests
run: ./gradlew testDebugUnitTest
- name: Upload app bundle to GitHub
uses: actions/upload-artifact@v4.6.0
with:
name: apk
path: app-android/build/outputs/bundle/qa/app-android-qa.aab