From 727d1a2c18df9ee28d5a12a732426ea1f085d0cb Mon Sep 17 00:00:00 2001 From: chenasyd Date: Sat, 23 Aug 2025 20:56:37 +0800 Subject: [PATCH] Create maven-publish.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 构建 --- .github/workflows/maven-publish.yml | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/maven-publish.yml diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml new file mode 100644 index 0000000..7b5fc06 --- /dev/null +++ b/.github/workflows/maven-publish.yml @@ -0,0 +1,37 @@ +name: Build Plugin + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + release: + types: [ created ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: '21' + distribution: 'adopt' + + - name: Build with Maven + run: mvn -B package + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: Plugin + path: target/*.jar + + - name: Upload to release + if: github.event_name == 'release' + uses: softprops/action-gh-release@v1 + with: + files: target/*.jar