File tree Expand file tree Collapse file tree 3 files changed +45
-2
lines changed Expand file tree Collapse file tree 3 files changed +45
-2
lines changed Original file line number Diff line number Diff line change 6
6
build :
7
7
runs-on : ubuntu-latest
8
8
steps :
9
- - uses : actions/checkout@v1
9
+ - uses : actions/checkout@v3
10
10
with :
11
11
submodules : recursive
12
12
- name : Set up Java 11
13
13
uses : actions/setup-java@v1
14
14
with :
15
15
java-version : 11
16
16
- name : Build with Gradle
17
- run : ./gradlew build
17
+ run : ./gradlew clean build test
18
18
- uses : actions/upload-artifact@v2-preview
19
19
with :
20
20
name : artifact
Original file line number Diff line number Diff line change
1
+ name : Java CI
2
+
3
+ on :
4
+ release :
5
+ types : [ published ]
6
+
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v3
12
+ with :
13
+ submodules : recursive
14
+ - name : Set up Java 11
15
+ uses : actions/setup-java@v1
16
+ with :
17
+ java-version : 11
18
+ - name : Build with Gradle
19
+ env :
20
+ GITHUB_USERNAME : ${{ secrets.github.actor }}
21
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
22
+ run : ./gradlew clean build test publish
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import java.io.IOException
3
3
plugins {
4
4
java
5
5
`java- library`
6
+ `maven- publish`
6
7
id(" com.diffplug.spotless" ) version " 6.1.2"
7
8
}
8
9
@@ -88,3 +89,23 @@ tasks.processResources {
88
89
)
89
90
}
90
91
}
92
+
93
+ publishing {
94
+ repositories {
95
+ maven {
96
+ name = " GitHubPackages"
97
+ url = uri(" https://maven.pkg.github.com/BlueMap-Minecraft/BlueMapAPI" )
98
+ credentials {
99
+ username = project.findProperty(" gpr.user" ) as String? ? : System .getenv(" GITHUB_USERNAME" )
100
+ password = project.findProperty(" gpr.key" ) as String? ? : System .getenv(" GITHUB_TOKEN" )
101
+ }
102
+ }
103
+ }
104
+
105
+ publications {
106
+ register<MavenPublication >(" gpr" ) {
107
+ from(components[" java" ])
108
+ artifactId = " BlueMapAPI"
109
+ }
110
+ }
111
+ }
You can’t perform that action at this time.
0 commit comments