-
Notifications
You must be signed in to change notification settings - Fork 18
42 lines (42 loc) · 1.54 KB
/
build.yaml
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
name: Build Project
on: [ push ]
env:
BUILD_CACHE_USER: ${{ secrets.BUILD_CACHE_USER }}
BUILD_CACHE_PWD: ${{ secrets.BUILD_CACHE_PWD }}
PUBLISHING_REPOSITORY_URL: ${{ secrets.PUBLISHING_REPOSITORY_URL }}
PUBLISHING_REPOSITORY_USER: ${{ secrets.PUBLISHING_REPOSITORY_USER }}
PUBLISHING_REPOSITORY_PWD: ${{ secrets.PUBLISHING_REPOSITORY_PWD }}
jobs:
gradle-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version-file: gradle/jdk-version.txt
- uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
- run: "./gradlew qualityCheck"
- run: "./gradlew test"
- run: "./gradlew testEndToEnd"
- run: "./gradlew testEndToEndSlow"
- run: "./gradlew check"
- run: "./gradlew cyclonedxBom --no-configuration-cache"
- run: "./gradlew publish"
if: ${{ !contains(github.ref_name, '/') }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: reports
path: gradle/aggregation/build/reports
- uses: DependencyTrack/gh-upload-sbom@v3
if: ${{ !contains(github.ref_name, '/') }}
with:
apiKey: ${{ secrets.DEPENDENCYTRACK_APIKEY }}
bomFilename: "gradle/aggregation/build/reports/sbom/bom.xml"
serverHostname: ${{ secrets.DEPENDENCYTRACK_URL }}
projectName: "gradle-project-setup-howto"
projectVersion: ${{ github.ref_name }}
autoCreate: true