-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6463eb2
Showing
11 changed files
with
903 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Release Plazmaclip | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
name: Release Plazma | ||
strategy: | ||
matrix: | ||
base_jdk: [21] | ||
os: [ubuntu-22.04] | ||
|
||
if: "!startsWith(github.event.commits[0].message, '[CI-Skip]')" | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/actions/wrapper-validation@v4 | ||
|
||
- name: Set up GraalVM ${{ matrix.base_jdk }} | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
java-version: ${{ matrix.base_jdk }} | ||
version: latest | ||
cache: 'gradle' | ||
|
||
- name: Configure Git | ||
run: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" && git config --global user.name "github-actions[bot]" | ||
|
||
- name: Publish Packages | ||
if: ${{ github.ref_name == 'master' }} | ||
run: | | ||
export GITHUB_USERNAME=${{ github.repository_owner }} | ||
./gradlew publish --info --stacktrace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
.gradle | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### IntelliJ IDEA ### | ||
.idea/modules.xml | ||
.idea/jarRepositories.xml | ||
.idea/compiler.xml | ||
.idea/libraries/ | ||
*.iws | ||
*.iml | ||
*.ipr | ||
out/ | ||
!**/src/main/**/out/ | ||
!**/src/test/**/out/ | ||
|
||
### Kotlin ### | ||
.kotlin | ||
|
||
### Eclipse ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
bin/ | ||
!**/src/main/**/bin/ | ||
!**/src/test/**/bin/ | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
### Mac OS ### | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
plugins { | ||
java | ||
signing | ||
`maven-publish` | ||
id("com.gradleup.shadow") version "8.3.4" apply false | ||
id("net.minecraftforge.gradlejarsigner") version "1.0.5" | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
subprojects { | ||
tasks.register<Jar>("sourcesJar") { | ||
from(zipTree(tasks.jar.map { it.outputs.files.singleFile })) | ||
archiveClassifier.set("sources") | ||
} | ||
} | ||
|
||
tasks { | ||
jar { | ||
jarSigner.sign(jar.get()) | ||
|
||
val app = project(":kotlin").tasks.named("shadowJar") | ||
dependsOn(app) | ||
|
||
from(zipTree(app.map { it.outputs.files.singleFile })) | ||
manifest { attributes("Main-Class" to "plazmaclip.PlazmaclipKt") } | ||
|
||
rename { if (it.endsWith("-LICENSE.txt")) "META-INF/license/$it" else it } | ||
} | ||
|
||
register<Jar>("sourcesJar") { | ||
val app = project(":kotlin").tasks.named("sourcesJar") | ||
dependsOn(app) | ||
|
||
from(zipTree(app.map { it.outputs.files.singleFile })) | ||
archiveClassifier.set("sources") | ||
} | ||
} | ||
|
||
publishing.publications { | ||
repositories.maven("https://maven.pkg.github.com/PlazmaMC/Plazmaclip") { | ||
name = "githubPackage" | ||
|
||
credentials { | ||
username = System.getenv("GITHUB_USERNAME") | ||
password = System.getenv("GITHUB_TOKEN") | ||
} | ||
} | ||
|
||
register<MavenPublication>("maven") { | ||
groupId = project.group.toString() | ||
version = project.version.toString() | ||
artifactId = "plazmaclip" | ||
|
||
from(components["java"]) | ||
artifact(tasks["sourcesJar"]) | ||
withoutBuildIdentifier() | ||
|
||
pom { | ||
url.set("https://github.com/PlazmaMC/Plazmaclip") | ||
name.set("plazmaclip") | ||
description.set(project.description) | ||
packaging = "jar" | ||
|
||
licenses { | ||
license { | ||
name.set("MIT") | ||
url.set("https://github.com/PlazmaMC/Plazmaclip/blob/main/LICENSE.md") | ||
distribution.set("repo") | ||
} | ||
} | ||
|
||
issueManagement { | ||
system.set("GitHub") | ||
url.set("https://github.com/PlazmaMC/Plazmaclip/issues") | ||
} | ||
|
||
developers { | ||
developer { | ||
id.set("AlphaKR93") | ||
name.set("Alpha") | ||
email.set("dev@alpha93.kr") | ||
url.set("https://alpha93.kr/") | ||
} | ||
} | ||
|
||
scm { | ||
url.set("https://github.com/PlazmaMC/Plazmaclip") | ||
connection.set("scm:git:https://github.com/PlazmaMC/Plazmaclip.git") | ||
developerConnection.set("scm:git:git@github.com:https://github.com/PlazmaMC/Plazmaclip.git") | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
val signingKey: String? by project | ||
val signingPassword: String? by project | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
sign(publishing.publications["maven"]) | ||
} | ||
|
||
jarSigner { | ||
autoDetect("") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
group = org.plazmamc | ||
version = 1.0.0-SNAPSHOT | ||
description = Launcher for the Plazma Minecraft Server | ||
|
||
kotlin.code.style = official |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Sat Nov 02 19:02:21 KST 2024 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.