mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
feat: support maven deploy
This commit is contained in:
@@ -37,13 +37,13 @@ jobs:
|
||||
run: bun install --frozen-lockfile && bun run build
|
||||
|
||||
- name: Build Boot with Gradle
|
||||
run: ./gradlew -Pversion=dev :boot:bootjar -x test
|
||||
run: ./gradlew :boot:bootjar -x test
|
||||
|
||||
- name: Upload Boot Jar
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: boot
|
||||
path: boot/build/libs/boot-dev.jar
|
||||
path: boot/build/libs/*.jar
|
||||
|
||||
docker-push:
|
||||
name: Docker Push
|
||||
@@ -78,6 +78,30 @@ jobs:
|
||||
push: true
|
||||
tags: docker.io/reajason/memshell-party:dev
|
||||
|
||||
deploy-maven:
|
||||
name: Docker Push
|
||||
needs: [ build-jar ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- name: Publish with Gradle
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralUsername }}
|
||||
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }}
|
||||
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKey }}
|
||||
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKeyId }}
|
||||
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKeyPassword }}
|
||||
run: ./gradlew publishAllToMavenCentral
|
||||
|
||||
deploy-northflank:
|
||||
name: Deploy to Northflank
|
||||
needs: [ docker-push ]
|
||||
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
run: bun install --frozen-lockfile && bun run build
|
||||
|
||||
- name: Build Boot with Gradle
|
||||
run: ./gradlew -Pversion=${{ needs.info.outputs.version-without-v }} :boot:bootjar -x test
|
||||
run: ./gradlew :boot:bootjar -x test
|
||||
|
||||
- name: Upload Boot Jar
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -125,18 +125,13 @@ jobs:
|
||||
name: boot
|
||||
path: boot/build/libs
|
||||
|
||||
- name: Calculate SHA-256
|
||||
id: calculate_sha256
|
||||
run: |
|
||||
sha256sum boot/build/libs/boot-${{ needs.info.outputs.version-without-v }}.jar > boot/build/libs/boot-${{ needs.info.outputs.version-without-v }}.sha256
|
||||
|
||||
- name: Release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
name: ${{ needs.info.outputs.version }}
|
||||
tag: ${{ needs.info.outputs.version }}
|
||||
body: ${{ needs.info.outputs.changelog }}
|
||||
artifacts: boot/build/libs/boot-${{ needs.info.outputs.version-without-v }}.jar,boot/build/libs/boot-${{ needs.info.outputs.version-without-v }}.sha256
|
||||
artifacts: boot/build/libs/boot-${{ needs.info.outputs.version-without-v }}.jar
|
||||
|
||||
deploy-northflank:
|
||||
name: Deploy to Northflank
|
||||
|
||||
+70
-2
@@ -1,10 +1,59 @@
|
||||
version = project.getProperties().get("version") != "unspecified" ? version : '1.0.0'
|
||||
import com.vanniktech.maven.publish.SonatypeHost
|
||||
|
||||
version = '1.6.1-SNAPSHOT'
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.31.0'
|
||||
classpath "io.freefair.lombok:io.freefair.lombok.gradle.plugin:8.13.1"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
if (it.name != 'bom') {
|
||||
group = 'io.github.reajason'
|
||||
|
||||
if (it.name != 'memshell-party-bom') {
|
||||
apply(plugin: 'java')
|
||||
apply(plugin: 'idea')
|
||||
apply(plugin: 'jacoco')
|
||||
apply(plugin: 'io.freefair.lombok')
|
||||
}
|
||||
|
||||
apply(plugin: 'com.vanniktech.maven.publish')
|
||||
|
||||
mavenPublishing {
|
||||
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
|
||||
signAllPublications()
|
||||
coordinates("io.github.reajason", project.name, rootProject.version as String)
|
||||
|
||||
pom {
|
||||
name = 'MemShellParty'
|
||||
description = project.description
|
||||
url = 'https://github.com/ReaJason/MemShellParty'
|
||||
inceptionYear = '2025'
|
||||
licenses {
|
||||
license {
|
||||
name = 'MIT'
|
||||
url = 'https://spdx.org/licenses/MIT.html'
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = 'reajason'
|
||||
name = 'ReaJason'
|
||||
url = "https://reajason.eu.org"
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection = 'scm:git:https://github.com/ReaJason/MemShellParty.git'
|
||||
developerConnection = 'scm:git:ssh://github.com/ReaJason/MemShellParty.git'
|
||||
url = 'https://github.com/ReaJason/MemShellParty'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (it.name != 'memshell-party-bom' && !it.name.startsWith("vul")) {
|
||||
@@ -49,3 +98,22 @@ jacocoTestReport {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('publishAllToMavenCentral') {
|
||||
def isSnapshot = rootProject.version.toString().endsWith('-SNAPSHOT')
|
||||
if (isSnapshot) {
|
||||
dependsOn ':memshell-party-bom:publishAllPublicationsToMavenCentralRepository'
|
||||
dependsOn ':memshell-party-common:publishAllPublicationsToMavenCentralRepository'
|
||||
dependsOn ':deserialize:publishAllPublicationsToMavenCentralRepository'
|
||||
dependsOn ':memshell:publishAllPublicationsToMavenCentralRepository'
|
||||
dependsOn ':memshell-java8:publishAllPublicationsToMavenCentralRepository'
|
||||
dependsOn ':generator:publishAllPublicationsToMavenCentralRepository'
|
||||
} else {
|
||||
dependsOn ':memshell-party-bom:publishAndReleaseToMavenCentral'
|
||||
dependsOn ':memshell-party-common:publishAndReleaseToMavenCentral'
|
||||
dependsOn ':deserialize:publishAndReleaseToMavenCentral'
|
||||
dependsOn ':memshell:publishAndReleaseToMavenCentral'
|
||||
dependsOn ':memshell-java8:publishAndReleaseToMavenCentral'
|
||||
dependsOn ':generator:publishAndReleaseToMavenCentral'
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,5 @@
|
||||
plugins {
|
||||
id "io.freefair.lombok" version "8.11"
|
||||
}
|
||||
|
||||
group = 'com.reajason.javaweb'
|
||||
group = 'io.github.reajason'
|
||||
description = "Java deserialize payload for MemShellParty"
|
||||
version = rootProject.version
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
plugins {
|
||||
id "io.freefair.lombok" version "8.11"
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(8)
|
||||
@@ -10,9 +6,11 @@ java {
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
group = 'com.reajason.javaweb'
|
||||
group = 'io.github.reajason'
|
||||
description = "MemShell Generator for Java"
|
||||
version = rootProject.version
|
||||
|
||||
// 测试使用 JDK17 进行编译与运行
|
||||
tasks.withType(Test).configureEach {
|
||||
javaLauncher = javaToolchains.launcherFor {
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
plugins {
|
||||
id "io.freefair.lombok" version "8.11"
|
||||
}
|
||||
|
||||
group = 'com.reajason.javaweb'
|
||||
group = 'io.github.reajason'
|
||||
version = rootProject.version
|
||||
|
||||
dependencies {
|
||||
@@ -18,11 +14,9 @@ dependencies {
|
||||
|
||||
testImplementation 'javax.servlet:javax.servlet-api'
|
||||
testImplementation 'javax.websocket:javax.websocket-api'
|
||||
testImplementation 'jakarta.servlet:jakarta.servlet-api'
|
||||
|
||||
testImplementation 'org.java-websocket:Java-WebSocket'
|
||||
testImplementation 'com.squareup.okhttp3:okhttp'
|
||||
testImplementation 'com.alibaba.fastjson2:fastjson2'
|
||||
testImplementation 'org.slf4j:slf4j-simple:2.0.16'
|
||||
|
||||
testImplementation platform('org.junit:junit-bom')
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
group = 'com.reajason.javaweb'
|
||||
group = 'io.github.reajason'
|
||||
description = "Normal Java MemShell for Java8"
|
||||
version = rootProject.version
|
||||
|
||||
java {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
group = 'com.reajason.javaweb'
|
||||
group = 'io.github.reajason'
|
||||
description = "Normal Java MemShell"
|
||||
version = rootProject.version
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
plugins {
|
||||
id "io.freefair.lombok" version "8.11"
|
||||
}
|
||||
|
||||
group = 'com.reajason.javaweb.tools'
|
||||
version = rootProject.version
|
||||
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
plugins {
|
||||
id "io.freefair.lombok" version "8.11"
|
||||
}
|
||||
|
||||
group = 'com.reajason.javaweb.tools'
|
||||
group = 'io.github.reajason.tools'
|
||||
version = rootProject.version
|
||||
|
||||
java {
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
plugins {
|
||||
id "io.freefair.lombok" version "8.11"
|
||||
}
|
||||
|
||||
|
||||
group = 'com.reajason.javaweb.tools'
|
||||
group = 'io.github.reajason.tools'
|
||||
version = rootProject.version
|
||||
|
||||
java {
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
plugins {
|
||||
id "io.freefair.lombok" version "8.11"
|
||||
}
|
||||
|
||||
|
||||
group = 'com.reajason.javaweb.tools'
|
||||
group = 'io.github.reajason.tools'
|
||||
version = rootProject.version
|
||||
|
||||
java {
|
||||
|
||||
Reference in New Issue
Block a user