Skip to content

Commit

Permalink
添加CI
Browse files Browse the repository at this point in the history
  • Loading branch information
handy-git committed Jun 19, 2024
1 parent 5947af4 commit 21acefd
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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 }}
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 21acefd

Please sign in to comment.