File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Java Gradle Build and Test
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v3
16+
17+ - name : Set up JDK 17
18+ uses : actions/setup-java@v3
19+ with :
20+ java-version : ' 17'
21+ distribution : ' temurin'
22+
23+ - name : Cache Gradle dependencies
24+ uses : actions/cache@v3
25+ with :
26+ path : ~/.gradle/caches
27+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
28+ restore-keys : |
29+ ${{ runner.os }}-gradle-
30+
31+ - name : Verify Gradle wrapper
32+ run : ./gradlew wrapper --gradle-version
33+
34+ - name : Build and test
35+ run : ./gradlew build test
36+
37+ - name : Build shadow JAR
38+ run : ./gradlew shadowJar
39+
40+ - name : Upload shadow JAR artifact
41+ uses : actions/upload-artifact@v3
42+ with :
43+ name : shadow-jar
44+ path : build/libs/*-all.jar
You can’t perform that action at this time.
0 commit comments