-
Notifications
You must be signed in to change notification settings - Fork 1
95 lines (78 loc) · 2.54 KB
/
gradle.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Gradle Build, Tests and Publish
# Runs on Pull Requests and on the `main` branch after the `changeset` workflow ran (see `publish` job)
on:
workflow_run:
workflows: [ Changeset ]
types:
- completed
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Adding Google Services
env:
DATA: ${{ secrets.GOOGLE_SERVICES }}
run: echo $DATA | base64 -di > ./example/google-services.json
- name: Build with Gradle Wrapper
run: echo "FAKE -- BUILD"
# run: ./gradlew build -xlint
test:
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
needs: [ "build" ]
steps:
- name: Test with Gradle Wrapper
run: echo "FAKE -- TEST"
# run: ./gradlew test
# - name: Publish Test Report
# uses: mikepenz/action-junit-report@v4
# if: success() || failure() # always run even if the previous step fails
# with:
# report_paths: '**/build/test-results/test*/TEST-*.xml'
lint:
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
needs: [ "build" ]
steps:
- name: Lint with Gradle Wrapper
run: echo "FAKE -- LINT"
# run: ./gradlew lint
# - name: Publish Lint Report
# uses: yutailang0119/action-android-lint@v4
# if: success() || failure() # always run even if the previous step fails
# with:
# report-path: '**/build/reports/lint-results-*.xml'
# ignore-warnings: false
# continue-on-error: false # If annotations contain error of severity, action-android-lint exit 1.
publish:
runs-on: ubuntu-latest
needs: [ "build", "test", "lint" ]
steps:
- name: Publish to Maven
run: echo "FAKE - PUBLISH"
dependency-submission:
runs-on: ubuntu-latest
permissions:
contents: write
needs: ["publish"] # only submit dependencies for published releases
steps:
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
- name: Generate and submit dependency graph
run: echo "FAKE - DEPENDENCY SUBMISSION"
# uses: gradle/actions/dependency-submission@v4
# with:
# cache-read-only: true