mirror of
https://github.com/jie65535/JChatGPT.git
synced 2026-09-22 03:06:10 +08:00
Build and test with JDK 17 while preserving the Java 11 bytecode target, cache Gradle dependencies, and upload the packaged Mirai plugin.
48 lines
996 B
YAML
48 lines
996 B
YAML
name: Build and Test
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: build-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
java-version: '17'
|
|
distribution: temurin
|
|
|
|
- name: Set up Gradle
|
|
uses: gradle/actions/setup-gradle@v6
|
|
|
|
- name: Build and test
|
|
run: |
|
|
chmod +x gradlew
|
|
./gradlew build buildPlugin --console=plain
|
|
|
|
- name: Upload plugin
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: JChatGPT-${{ github.sha }}
|
|
path: build/mirai/*.mirai2.jar
|
|
if-no-files-found: error
|
|
retention-days: 14
|