From dcbc5aeb44243c9d75441d71e2454c8102f3b055 Mon Sep 17 00:00:00 2001 From: YouHaveTrouble Date: Sun, 23 Nov 2025 18:51:32 +0100 Subject: [PATCH] add a workflow to build the plugin --- .github/workflows/push.yml | 29 +++++++++++++++++++++++++++++ pom.xml | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) 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..110203f --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,29 @@ +name: Build commit +on: + push: + branches: [ master ] + paths: + - "src/**" + workflow_dispatch: + +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} + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: artifact + path: 'target/Stand-in-*.jar' diff --git a/pom.xml b/pom.xml index 379b7be..f5a4c16 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.youhavetrouble.standin Stand-in - 1.0-SNAPSHOT + 0.1.0 jar Stand-in