From 21acefdd77282ef9afb4b1e8d641457a4acaf1a5 Mon Sep 17 00:00:00 2001 From: handy Date: Wed, 19 Jun 2024 17:46:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 49 +++++++++++++++++++++++++++++++++++++ README.md | 7 ++++-- 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1827970 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,49 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '21' + + - name: Cache Maven dependencies + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Decode and set up Maven settings + run: echo "${{ secrets.MAVEN_SETTINGS_BASE64 }}" | base64 --decode > $HOME/.m2/settings.xml + + - name: Build with Maven + run: mvn --batch-mode clean install + + - name: Find built JAR + id: find-jar + run: | + JAR_PATH=$(find target -name '*.jar' | grep -v 'original' | head -n 1) + echo "JAR_PATH=$JAR_PATH" >> $GITHUB_ENV + + - name: Upload JAR file + uses: actions/upload-artifact@v4 + with: + name: PlayerChat Artifacts + path: ${{ env.JAR_PATH }} diff --git a/README.md b/README.md index 39151b0..715317d 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,14 @@ 如果本插件帮助到你,请帮忙右上角点个Star就对作者很大的支持了~ 使用教程: [点击查看](https://ricedoc.handyplus.cn/wiki/PlayerChat/README/) -购买地址: [点击查看](https://afdian.net/item/83c6b64614cd11ee8dee52540025c377) -下载地址: [点击查看](https://github.com/handy-git/PlayerChat/releases) +购买地址: [点击查看](https://afdian.net/item/83c6b64614cd11ee8dee52540025c377) 购买后可获得售后服务,作者会指导使用,如未购买请自行查阅wiki了解如何使用 +开发版本下载渠道: + +[GITHUB ACTIONS](https://github.com/handy-git/PlayerChat/actions) + ## 使用统计 ![](https://bstats.org/signatures/bukkit/PlayerChat.svg)