Mu... mukyu~ (Reposilite publishing)
This commit is contained in:
7
.github/workflows/build-commit.yml
vendored
7
.github/workflows/build-commit.yml
vendored
@@ -38,3 +38,10 @@ jobs:
|
||||
with:
|
||||
name: nitori-artifacts-${{ steps.ref.outputs.branch }}
|
||||
path: build/libs/*.jar
|
||||
- name: Reposilite upload
|
||||
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
|
||||
with:
|
||||
arguments: publish
|
||||
env:
|
||||
USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_GENSOREPOUSERNAME }}
|
||||
TOKEN: ${{ secrets.ORG_GRADLE_PROJECT_GENSOREPOPASSWORD }}
|
||||
@@ -4,6 +4,7 @@ plugins {
|
||||
id("com.github.johnrengelman.shadow")
|
||||
id("io.papermc.paperweight.userdev")
|
||||
id("com.diffplug.spotless")
|
||||
id("maven-publish")
|
||||
}
|
||||
|
||||
// Expose version catalog
|
||||
@@ -52,3 +53,34 @@ spotless {
|
||||
licenseHeaderFile("LICENSE_header.txt")
|
||||
}
|
||||
}
|
||||
|
||||
var jarFile = file("build/libs/%s-%s.jar".format(project.name, project.version))
|
||||
var jarArtifact = artifacts.add("default", jarFile) {
|
||||
type = "jar"
|
||||
builtBy("jar")
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("mavenJava") {
|
||||
artifact(jarArtifact)
|
||||
group = "plugins"
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "gensorepo"
|
||||
credentials {
|
||||
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
|
||||
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
|
||||
}
|
||||
// url to the releases maven repository
|
||||
url = uri("https://repo.gensokyoreimagined.net/")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("publishMavenJavaPublicationToGensorepoRepository") {
|
||||
dependsOn("reobfJar")
|
||||
}
|
||||
Reference in New Issue
Block a user