add a workflow to build the plugin

This commit is contained in:
2025-11-23 18:51:32 +01:00
parent 140c25006d
commit dcbc5aeb44
2 changed files with 30 additions and 1 deletions
+29
View File
@@ -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'
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>me.youhavetrouble.standin</groupId>
<artifactId>Stand-in</artifactId>
<version>1.0-SNAPSHOT</version>
<version>0.1.0</version>
<packaging>jar</packaging>
<name>Stand-in</name>