This repository has been archived by the owner on Oct 16, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 15
57 lines (47 loc) · 1.54 KB
/
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
50
51
52
53
54
55
56
57
name: Build & test
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: macos-14
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/gradle-build-action@v3
with:
gradle-home-cache-cleanup: true
- name: Build
run: ./gradlew build --no-configuration-cache
- name: Deploy to Sonatype
if: github.event_name == 'push' # only deploy for pushed commits (not PRs)
run: ./gradlew publish --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }}
- name: Upload reports
if: always()
uses: actions/upload-artifact@v4
with:
name: android-reports
path: |
**/build/reports/*
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: android-test-results
path: |
**/build/test-results/*