2022-04-22 11:55:43 +08:00
|
|
|
name: "Build"
|
2022-04-22 12:21:08 +08:00
|
|
|
on:
|
2022-04-30 04:33:13 +08:00
|
|
|
workflow_dispatch: ~
|
2022-04-22 12:21:08 +08:00
|
|
|
push:
|
2022-04-30 04:33:13 +08:00
|
|
|
paths:
|
|
|
|
- "**.java"
|
2022-04-22 12:21:08 +08:00
|
|
|
branches:
|
|
|
|
- "stable"
|
2022-07-11 23:24:28 +08:00
|
|
|
- "development"
|
2022-04-23 10:02:41 +08:00
|
|
|
pull_request:
|
2022-04-30 04:33:13 +08:00
|
|
|
paths:
|
|
|
|
- "**.java"
|
2022-04-23 10:02:41 +08:00
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
- synchronize
|
|
|
|
- reopened
|
2022-04-22 11:55:43 +08:00
|
|
|
jobs:
|
|
|
|
Build-Server-Jar:
|
2022-04-23 10:02:41 +08:00
|
|
|
runs-on: ubuntu-latest
|
2022-04-22 11:55:43 +08:00
|
|
|
steps:
|
2022-04-22 12:13:38 +08:00
|
|
|
- name: Checkout
|
2022-07-11 16:25:14 +08:00
|
|
|
uses: actions/checkout@v3
|
2022-04-22 12:13:38 +08:00
|
|
|
- name: Setup Java
|
|
|
|
uses: actions/setup-java@v3
|
2022-04-22 11:57:30 +08:00
|
|
|
with:
|
|
|
|
distribution: temurin
|
2022-04-25 16:57:46 +08:00
|
|
|
java-version: '17'
|
2022-05-14 20:52:48 +08: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-
|
2022-04-22 12:13:38 +08:00
|
|
|
- name: Run Gradle
|
2022-04-23 10:02:41 +08:00
|
|
|
run: ./gradlew && ./gradlew jar
|
2022-04-22 12:13:38 +08:00
|
|
|
- name: Upload build
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: Grasscutter
|
2022-05-08 09:24:18 +08:00
|
|
|
path: grasscutter-*.jar
|