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 66 build :
77 runs-on : ubuntu-latest
88 steps :
9- - uses : actions/checkout@v1
9+ - uses : actions/checkout@v3
1010 with :
1111 submodules : recursive
1212 - name : Set up Java 11
1313 uses : actions/setup-java@v1
1414 with :
1515 java-version : 11
1616 - name : Build with Gradle
17- run : ./gradlew build
17+ run : ./gradlew clean build test
1818 - uses : actions/upload-artifact@v2-preview
1919 with :
2020 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
33plugins {
44 java
55 `java- library`
6+ `maven- publish`
67 id(" com.diffplug.spotless" ) version " 6.1.2"
78}
89
@@ -88,3 +89,23 @@ tasks.processResources {
8889 )
8990 }
9091}
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