-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (60 loc) · 1.98 KB
/
build.yml
File metadata and controls
71 lines (60 loc) · 1.98 KB
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
name: Build On Push
on:
workflow_call:
inputs:
github-event-action:
type: string
required: true
secrets:
GPG_SIGNING_KEY:
required: true
GPG_SIGNING_PASSPHRASE:
required: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 1.8
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 8
java-package: jdk
cache: 'gradle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"
- name: Run Gradle Build
run: ./gradlew -Pgithub.event.action=${{inputs.github-event-action}} dependencyReport build
- name: Try signing
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
run: ./gradlew -Pgithub.event.action=${{inputs.github-event-action}} signMavenJavaPublication
- name: Store Dependency Report
uses: actions/upload-artifact@v4
with:
name: dependencies
path: "**/build/reports/project/dependencies.txt"
- name: Store HTML test report
uses: actions/upload-artifact@v4
with:
name: test-report-html
path: "**/reports/tests/"
if-no-files-found: ignore
- name: Store XML test report
uses: actions/upload-artifact@v4
with:
name: test-results-xml
path: "**/test-results/"
if-no-files-found: ignore
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
junit_files: "**/test-results/**/*.xml"