-
Notifications
You must be signed in to change notification settings - Fork 18
44 lines (37 loc) · 985 Bytes
/
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
name: Build & Test Project
on:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set Up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Run Unit Tests
run: ./gradlew testDebug
- name: Assemble
env:
VERSION_CODE: ${{ github.run_number }}
run: ./gradlew assembleDebug assembleDebugAndroidTest
- uses: actions/upload-artifact@v4
with:
name: apk
path: |
app/build/outputs/apk/debug/app-debug.apk
app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
pre-release-upload:
needs: build
if: github.event_name != 'pull_request'
uses: ./.github/workflows/pre-release-upload.yml
secrets: inherit