Grasscutter/.github/workflows/build.yml

52 lines
1.3 KiB
YAML
Raw Normal View History

2022-04-22 03:55:43 +00:00
name: "Build"
2022-04-22 04:21:08 +00:00
on:
workflow_dispatch: ~
2022-04-22 04:21:08 +00:00
push:
paths:
- "**.java"
2022-04-22 04:21:08 +00:00
branches:
- "stable"
- "development"
- "unstable"
- "unstable-quests"
pull_request:
paths:
- "**.java"
types:
- opened
- synchronize
- reopened
2022-04-22 03:55:43 +00:00
jobs:
Build-Server-Jar:
runs-on: ubuntu-latest
2022-04-22 03:55:43 +00:00
steps:
2022-04-22 04:13:38 +00:00
- name: Checkout
2022-07-11 08:25:14 +00:00
uses: actions/checkout@v3
2022-04-22 04:13:38 +00:00
- name: Setup Java
uses: actions/setup-java@v3
2022-04-22 03:57:30 +00:00
with:
distribution: temurin
2022-04-25 08:57:46 +00:00
java-version: '17'
2022-05-14 12:52:48 +00:00
- name: Cache gradle files
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
./.gradle/loom-cache
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle', 'gradle.properties', '**/*.accesswidener') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Download Handbook
uses: suisei-cn/actions-download-file@v1.4.0
with:
url: https://api.grasscutter.io/static/handbook.html
target: src/main/resources/html/
2022-04-22 04:13:38 +00:00
- name: Run Gradle
2023-05-26 18:57:20 +00:00
run: ./gradlew -PskipHandbook=1 && ./gradlew jar -PskipHandbook=1
2022-04-22 04:13:38 +00:00
- name: Upload build
uses: actions/upload-artifact@v3
with:
name: Grasscutter
2022-05-08 01:24:18 +00:00
path: grasscutter-*.jar