-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (54 loc) · 1.68 KB
/
maven.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
52
53
54
55
56
57
58
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Java CI with Maven
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 8, 17, 21 ]
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: "temurin"
cache: maven
- name: Build Spigot (JDK 8)
uses: SpraxDev/Action-SpigotMC@v4
with:
versions: 1.16.5, 1.16.3, 1.16.1, 1.15.2, 1.14.4, 1.13.2, 1.13, 1.12.2
remapped: true
java-version: 8
- name: Build Spigot (JDK 17)
uses: SpraxDev/Action-SpigotMC@v4
with:
versions: 1.20.1, 1.19, 1.18.2, 1.18.1, 1.17.1
remapped: true
java-version: 17
- name: Build Spigot (JDK 21)
uses: SpraxDev/Action-SpigotMC@v4
with:
versions: 1.21, 1.20.6, 1.20.2
remapped: true
java-version: 21
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Cache Maven
id: cache-primes
uses: actions/cache@v3
with:
path: |
~/.m2
~/repository
key: ${{ github.job }}-${{ hashFiles('**/pom.xml') }}