-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (66 loc) · 2.31 KB
/
release.yml
File metadata and controls
76 lines (66 loc) · 2.31 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
72
73
74
75
76
name: Release
on:
workflow_call:
inputs:
github-event-action:
required: true
type: string
secrets:
GPG_SIGNING_KEY:
required: true
GPG_SIGNING_PASSPHRASE:
required: true
SONATYPE_USERNAME:
required: true
SONATYPE_PASSWORD:
required: true
jobs:
build:
name: Build and Release
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: Release
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
run: ./gradlew -Pgithub.event.action=${{inputs.github-event-action}} dependencyReport test publishToSonatype closeSonatypeStagingRepository
# we do not invoke closeAndReleaseSonatypeStagingRepository to allow a last manual check at the Sonatpye staging area
# for getting a chance to drop it in case of mistakes or errors
- 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"