-
Notifications
You must be signed in to change notification settings - Fork 66
34 lines (32 loc) · 1.19 KB
/
gradle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Java CI with Gradle
on: [ push, pull_request ]
jobs:
build:
# Only run on PRs if the source branch is on a different repo. We do not need to run everything twice. (From ViaVersion)
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4.2.2
- name: Cache Minecraft reports
uses: actions/cache@v4.1.2
with:
path: |
plugin/build/minecraft/
plugin/build/generated/minecraft/mappings/
key: minecraft-${{ hashFiles('gradle.properties') }} # Cache key is based on gradle.properties because of gameVersions property
- name: Setup Java
uses: actions/setup-java@v4.5.0
with:
distribution: temurin
java-version: 21
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3.3.2
- name: Build with Gradle
run: ./gradlew build
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.4.3
with:
name: LimboAPI
path: "build/libs/limboapi-*.jar"