File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : build-java
2+ on : [ push, pull_request ]
3+
4+ jobs :
5+ build :
6+ runs-on : docker
7+ steps :
8+ - name : checkout repository
9+ uses : https://code.forgejo.org/actions/checkout@v4
10+ - name : setup jdk
11+ uses : https://github.com/actions/setup-java@v4
12+ with :
13+ java-version : |
14+ 8
15+ 21
16+ distribution : temurin
17+ - name : restore cached dependencies
18+ uses : https://code.forgejo.org/actions/cache/restore@v4
19+ with :
20+ path : |
21+ ~/.gradle/caches
22+ ~/.gradle/wrapper
23+ key : ${{ runner.os }}-Gradle
24+ - name : build
25+ run : ./gradlew build --no-daemon --warning-mode=all
26+ - name : capture build artifacts
27+ uses : https://code.forgejo.org/forgejo/upload-artifact@v4
28+ with :
29+ name : build-artifacts.zip
30+ path : |
31+ build/libs
32+ !build/libs/*-all.jar
33+ if-no-files-found : error
34+ - name : cache downloaded dependencies
35+ if : ${{ github.ref_name == github.event.repository.default_branch }}
36+ uses : https://code.forgejo.org/actions/cache/save@v4
37+ with :
38+ path : |
39+ ~/.gradle/caches
40+ ~/.gradle/wrapper
41+ key : ${{ runner.os }}-Gradle
You can’t perform that action at this time.
0 commit comments