From 3fe94deb55e170ba1582caa15774e7fa806b67d7 Mon Sep 17 00:00:00 2001 From: YouHaveTrouble Date: Tue, 22 Oct 2024 20:31:02 +0200 Subject: [PATCH] build on push --- .github/workflows/push.yml | 19 ++++++ pom.xml | 117 +++++++++++++++++++------------------ 2 files changed, 78 insertions(+), 58 deletions(-) create mode 100644 .github/workflows/push.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..6336004 --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,19 @@ +name: Build commit +on: [push] + +jobs: + build-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up JDK + uses: actions/setup-java@v3 + with: + java-version: 21 + distribution: 'temurin' + - name: Set short commit hash + run: fullCommit=${{ github.sha }} && echo "SHORT_SHA=${fullCommit:0:8}" >> $GITHUB_ENV + - name: Build with Maven + run: mvn -B clean package --file pom.xml -Drevision=${{ github.ref_name }}-${SHORT_SHA} diff --git a/pom.xml b/pom.xml index 4af2c7c..1239640 100644 --- a/pom.xml +++ b/pom.xml @@ -2,72 +2,73 @@ - 4.0.0 + 4.0.0 - me.youhavetrouble - Enchantio - 0.1 - jar + me.youhavetrouble.enchantio + Enchantio + ${revision} + jar - Enchantio + Enchantio Custom enchants for paper servers - 21 - UTF-8 - + 21 + UTF-8 + 1.0 + https://youhavetrouble.me - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - ${java.version} - ${java.version} - - - - org.apache.maven.plugins - maven-shade-plugin - 3.2.4 - - - package - - shade - - - - - - - - src/main/resources - true - - - + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + ${java.version} + ${java.version} + + + + org.apache.maven.plugins + maven-shade-plugin + 3.2.4 + + + package + + shade + + + + + + + + src/main/resources + true + + + - - - papermc-repo - https://repo.papermc.io/repository/maven-public/ - - - sonatype - https://oss.sonatype.org/content/groups/public/ - - + + + papermc-repo + https://repo.papermc.io/repository/maven-public/ + + + sonatype + https://oss.sonatype.org/content/groups/public/ + + - - - io.papermc.paper - paper-api - 1.21.1-R0.1-SNAPSHOT - provided - - + + + io.papermc.paper + paper-api + 1.21.1-R0.1-SNAPSHOT + provided + +