File tree 3 files changed +51
-0
lines changed
3 files changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : build pr
2
+ on :
3
+ pull_request :
4
+ branches : [ main ]
5
+ jobs :
6
+ build :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - uses : actions/checkout@v4
10
+ - uses : gradle/wrapper-validation-action@v1
11
+ - name : Set up JDK
12
+ uses : actions/setup-java@v3
13
+ with :
14
+ distribution : ' temurin'
15
+ java-version : ' 17'
16
+ - name : Setup Gradle
17
+ uses : gradle/gradle-build-action@v2
18
+ - name : Build
19
+ run : ./gradlew build
Original file line number Diff line number Diff line change
1
+ name : publish
2
+ on :
3
+ push :
4
+ branches : [ main ]
5
+ jobs :
6
+ build :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - uses : actions/checkout@v4
10
+ - uses : gradle/wrapper-validation-action@v1
11
+ - name : Set up JDK
12
+ uses : actions/setup-java@v3
13
+ with :
14
+ distribution : ' temurin'
15
+ java-version : ' 17'
16
+ - name : Setup Gradle
17
+ uses : gradle/gradle-build-action@v2
18
+ - name : Build
19
+ run : ./gradlew build
20
+ - name : Publish
21
+ run : ./gradlew publish
22
+ env :
23
+ REPO_USER : ${{ secrets.REPO_USER }}
24
+ REPO_TOKEN : ${{ secrets.REPO_TOKEN }}
Original file line number Diff line number Diff line change @@ -26,6 +26,14 @@ java {
26
26
}
27
27
28
28
publishing {
29
+ repositories.maven {
30
+ name = " Repo"
31
+ url = uri(" https://repo.jpenilla.xyz/snapshots" )
32
+ credentials {
33
+ username = System .getenv(" REPO_USER" )
34
+ password = System .getenv(" REPO_TOKEN" )
35
+ }
36
+ }
29
37
publications.create<MavenPublication >(" maven" ) {
30
38
from(components[" java" ])
31
39
}
You can’t perform that action at this time.
0 commit comments