File tree 5 files changed +63
-2
lines changed
5 files changed +63
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Upload JAR
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ paths :
8
+ - ' src/**'
9
+ - ' build.gradle'
10
+ - ' .github/workflows/main.yml'
11
+ pull_request :
12
+ branches :
13
+ - ' *'
14
+ paths :
15
+ - ' src/**'
16
+ - ' build.gradle'
17
+ - ' .github/workflows/main.yml'
18
+
19
+ permissions :
20
+ contents : read
21
+
22
+ jobs :
23
+ build :
24
+ runs-on : ubuntu-latest
25
+
26
+ steps :
27
+ - name : Checkout repository
28
+ uses : actions/checkout@v4
29
+
30
+ - name : Set up JDK 17
31
+ uses : actions/setup-java@v4
32
+ with :
33
+ distribution : ' adopt'
34
+ java-version : ' 17'
35
+
36
+ - name : Verify Gradle installation
37
+ run : ./gradlew --version
38
+
39
+ - name : Cache Gradle packages
40
+ uses : actions/cache@v3
41
+ with :
42
+ path : ~/.gradle/caches
43
+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
44
+ restore-keys : |
45
+ ${{ runner.os }}-gradle-
46
+
47
+ - name : Run build
48
+ run : chmod +x ./gradlew && ./gradlew build shadowJar
49
+ env :
50
+ GRADLE_OPTS : -Dorg.gradle.daemon=false
51
+ DO_NOT_TRACK : true
52
+
53
+ - name : Upload build artifacts
54
+ uses : actions/upload-artifact@v3
55
+ with :
56
+ name : build-artifacts
57
+ path : lib/build/libs/wherobots-jdbc-*.jar
Original file line number Diff line number Diff line change 1
1
distributionBase =GRADLE_USER_HOME
2
2
distributionPath =wrapper/dists
3
- distributionUrl =https\://services.gradle.org/distributions/gradle-8.7 -bin.zip
3
+ distributionUrl =https\://services.gradle.org/distributions/gradle-8.8 -bin.zip
4
4
networkTimeout =10000
5
5
validateDistributionUrl =true
6
6
zipStoreBase =GRADLE_USER_HOME
Original file line number Diff line number Diff line change 55
55
# Darwin, MinGW, and NonStop.
56
56
#
57
57
# (3) This script is generated from the Groovy template
58
- # https://github.com/gradle/gradle/blob/HEAD/subprojects/ plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58
+ # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/ plugins-application /src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59
59
# within the Gradle project.
60
60
#
61
61
# You can find Gradle at https://github.com/gradle/gradle/.
Original file line number Diff line number Diff line change @@ -47,3 +47,7 @@ tasks.named('jar') {
47
47
' Implementation-Version' : project. version)
48
48
}
49
49
}
50
+
51
+ tasks. withType(Jar ) {
52
+ archiveBaseName. set(' wherobots-jdbc' )
53
+ }
You can’t perform that action at this time.
0 commit comments