-
Notifications
You must be signed in to change notification settings - Fork 9
51 lines (42 loc) · 1.39 KB
/
build.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This workflow will build Akropolis with Gradle.
# It will be compiled against Java 21.
name: Build
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
# Builds Akropolis in recommended JDK version.
build-plugin:
runs-on: ubuntu-latest
# For Minecraft 1.21, Java 21+ is needed/recommended.
strategy:
matrix:
java_version: [ 21 ]
steps:
- name: Checkout GitHub repository
uses: actions/checkout@v4
- name: Gradle Wrapper Validation
uses: gradle/actions/wrapper-validation@v3
- name: Cleanup old JARs
run: rm -f build/libs/*.jar
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java_version }}
distribution: temurin
cache: gradle
- name: Build plugin
run: ./gradlew shadowJar
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Akropolis Artifact
path: build/libs/*.jar