File tree Expand file tree Collapse file tree 3 files changed +50
-1
lines changed
Expand file tree Collapse file tree 3 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ tags :
4+ - ' *'
5+
6+ concurrency :
7+ group : ${{ github.workflow }}-${{ github.ref }}
8+
9+ jobs :
10+ maven :
11+ name : Publish artifacts to maven
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout Repository
15+ uses : actions/checkout@v4
16+
17+ - name : Set up JDK 17
18+ uses : actions/setup-java@v4
19+ with :
20+ distribution : ' temurin'
21+ java-version : ' 17'
22+
23+ - name : Publish to Maven
24+ run : ./gradlew publish -PreposiliteUsername=${{ secrets.MAVEN_USER }} -PreposilitePassword=${{ secrets.MAVEN_TOKEN }}
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ plugins {
2323 id(" architectury-plugin" ) version " 3.4-SNAPSHOT"
2424 id(" dev.architectury.loom" ) version " 1.7-SNAPSHOT" apply false
2525 id(" com.github.johnrengelman.shadow" ) version " 8.1.1" apply false
26+ id(" maven-publish" )
2627}
2728
2829architectury {
@@ -32,12 +33,36 @@ architectury {
3233subprojects {
3334 apply (plugin = " dev.architectury.loom" )
3435 apply (plugin = " org.jetbrains.dokka" )
36+ apply (plugin = " maven-publish" )
3537
3638 dependencies {
3739 " minecraft" (" com.mojang:minecraft:$minecraftVersion " )
3840 " mappings" (" net.fabricmc:yarn:$minecraftVersion +$yarnMappings :v2" )
3941 }
4042
43+ publishing {
44+ publications {
45+ register<MavenPublication >(" maven" ) {
46+ groupId = mavenGroup
47+ artifactId = if (project.name == " common" ) modId else " $modId -${project.name} "
48+ version = " $modVersion +$minecraftVersion "
49+
50+ from(components[" java" ])
51+ }
52+ }
53+
54+ repositories {
55+ maven {
56+ name = " reposilite"
57+ url = uri(" https://maven.lambda-client.org/lambda" )
58+ credentials(PasswordCredentials ::class )
59+ authentication {
60+ create<BasicAuthentication >(" basic" )
61+ }
62+ }
63+ }
64+ }
65+
4166 if (path == " :common" ) return @subprojects
4267
4368 tasks {
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ dependencies {
4949 implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion " )
5050
5151 // Baritone
52- modImplementation(" baritone-api:baritone-unoptimized-fabric:1.10.2" )
52+ modImplementation(" baritone-api:baritone-unoptimized-fabric:1.10.2" ) { isTransitive = false }
5353}
5454
5555tasks {
You can’t perform that action at this time.
0 commit comments