File tree 4 files changed +79
-1
lines changed
4 files changed +79
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Build Release
2
+ on :
3
+ release :
4
+ types : [ created ]
5
+ jobs :
6
+ build :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - uses : actions/checkout@v2
10
+
11
+ - name : Set up JDK 17
12
+ uses : actions/setup-java@v2
13
+ with :
14
+ distribution : ' adopt'
15
+ java-version : ' 17'
16
+
17
+ - name : Grant execute permission for gradlew
18
+ run : chmod +x gradlew
19
+
20
+ - name : Publish
21
+ run : ./gradlew publish -Pmvn.user=${{ secrets.MAVEN_USER }} -Pmvn.key=${{ secrets.MAVEN_TOKEN }}
22
+
23
+ - uses : actions/upload-artifact@v2
24
+ with :
25
+ name : Artifacts
26
+ path : ./build/libs/
Original file line number Diff line number Diff line change
1
+ name : Build Snapshot
2
+
3
+ on :
4
+ push :
5
+ branches-ignore :
6
+ - ' feature/**'
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v2
13
+
14
+ - name : Set up JDK 17
15
+ uses : actions/setup-java@v3
16
+ with :
17
+ distribution : ' temurin'
18
+ java-version : ' 17'
19
+ cache : ' gradle'
20
+
21
+ - name : Grant execute permission for gradlew
22
+ run : chmod +x gradlew
23
+
24
+ - name : Publish
25
+ run : ./gradlew publish -Pversion_snapshot -Pmvn.user=${{ secrets.MAVEN_USER }} -Pmvn.key=${{ secrets.MAVEN_TOKEN }} -x test
26
+
27
+ - uses : actions/upload-artifact@v2
28
+ with :
29
+ name : Snapshot Artifacts
30
+ path : ./build/libs/
Original file line number Diff line number Diff line change
1
+ import java.net.URI
2
+
1
3
plugins {
2
4
kotlin(" jvm" ) version " 1.9.22"
3
5
`java- gradle- plugin`
4
6
`maven- publish`
5
7
}
6
8
7
9
group = " xyz.wagyourtail.unimined.expect-platform"
8
- version = " 1.0 -SNAPSHOT"
10
+ version = if (project.hasProperty( " version_snapshot " )) project.properties[ " version " ] as String + " -SNAPSHOT" else project.properties[ " version " ] as String
9
11
10
12
base {
11
13
archivesName.set(" expect-platform" )
@@ -19,6 +21,10 @@ java {
19
21
20
22
withJavadocJar()
21
23
withSourcesJar()
24
+
25
+ toolchain {
26
+ languageVersion.set(JavaLanguageVersion .of(8 ))
27
+ }
22
28
}
23
29
24
30
repositories {
@@ -76,6 +82,20 @@ gradlePlugin {
76
82
}
77
83
78
84
publishing {
85
+ repositories {
86
+ maven {
87
+ name = " WagYourMaven"
88
+ url = if (project.hasProperty(" version_snapshot" )) {
89
+ URI .create(" https://maven.wagyourtail.xyz/snapshots/" )
90
+ } else {
91
+ URI .create(" https://maven.wagyourtail.xyz/releases/" )
92
+ }
93
+ credentials {
94
+ username = project.findProperty(" mvn.user" ) as String? ? : System .getenv(" USERNAME" )
95
+ password = project.findProperty(" mvn.key" ) as String? ? : System .getenv(" TOKEN" )
96
+ }
97
+ }
98
+ }
79
99
publications {
80
100
create<MavenPublication >(" mavenJava" ) {
81
101
groupId = " xyz.wagyourtail.unimined.expect-platform"
Original file line number Diff line number Diff line change 1
1
kotlin.code.style =official
2
2
3
+ version = 1.0.0
4
+
3
5
asmVersion =9.7
You can’t perform that action at this time.
0 commit comments