From 3adc9137bda75e3b35e6c9b3df92692a505c1133 Mon Sep 17 00:00:00 2001 From: Fortern Date: Sun, 7 Jun 2026 11:03:12 +0800 Subject: [PATCH] workflows --- .github/workflows/workflow.yml | 35 ++++++++++ pom.xml | 124 +++++++++++++++++---------------- 2 files changed, 100 insertions(+), 59 deletions(-) create mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..3711be5 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,35 @@ +name: Build Plugin +run-name: Building Plugin 🚀 +on: + push: + tags: + - '*' + +jobs: + build: + name: Build with Maven + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Set up JDK 25 and enable Maven cache + uses: actions/setup-java@v5 + with: + distribution: 'liberica' + java-version: '25' + cache: 'maven' + + - name: Set up Maven + uses: stCarolas/setup-maven@v5 + with: + maven-version: 3.9.16 + + - name: Build and package with Maven + run: mvn -B package + + - name: Upload built artifacts + uses: actions/upload-artifact@v3 + with: + name: maven-artifacts + path: target/spigot/*.jar \ No newline at end of file diff --git a/pom.xml b/pom.xml index eed4538..409ef69 100644 --- a/pom.xml +++ b/pom.xml @@ -17,65 +17,6 @@ UTF-8 - - clean package - ${project.basedir}/src/main/kotlin - - - org.jetbrains.kotlin - kotlin-maven-plugin - ${kotlin.version} - - - compile - compile - - compile - - - - - ${java.version} - - - - org.apache.maven.plugins - maven-shade-plugin - 3.5.3 - - - package - - shade - - - - - - - - src/main/resources - true - - - - - - - spigotmc-repo - https://hub.spigotmc.org/nexus/content/repositories/snapshots/ - - - placeholderapi - https://repo.helpch.at/releases/ - - - codemc-repo - https://repo.codemc.io/repository/maven-public/ - default - - - @@ -89,6 +30,7 @@ org.jetbrains.kotlin kotlin-stdlib ${kotlin.version} + provided @@ -126,4 +68,68 @@ provided + + + clean package + ${project.basedir}/src/main/kotlin + + + org.jetbrains.kotlin + kotlin-maven-plugin + ${kotlin.version} + + + compile + compile + + compile + + + + + ${java.version} + + + + org.apache.maven.plugins + maven-shade-plugin + 3.5.3 + + + package + + shade + + + + + ${project.artifactId}-spigot-${project.version} + ${project.build.directory}/spigot + false + + + + + + src/main/resources + true + + + + + + + spigotmc-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + + placeholderapi + https://repo.helpch.at/releases/ + + + codemc-repo + https://repo.codemc.io/repository/maven-public/ + default + +