-
Notifications
You must be signed in to change notification settings - Fork 18
78 lines (75 loc) · 3.19 KB
/
compile.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Compile
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up BuildTools
run: wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
- name: Install JDK 8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
cache: 'maven'
- name: Install CraftBukkit 1.8.8, 1.12.2, 1.16.5
run: |
java -jar BuildTools.jar --rev 1.8.8 --compile craftbukkit
java -jar BuildTools.jar --rev 1.12.2 --compile craftbukkit
java -jar BuildTools.jar --rev 1.16.5 --compile craftbukkit
- name: Install JDK 17
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '17'
cache: 'maven'
- name: Install CraftBukkit 1.17.1, 1.18.2, 1.19.4, 1.20.1, 1.20.4
run: |
java -jar BuildTools.jar --rev 1.17.1 --compile craftbukkit --remapped
java -jar BuildTools.jar --rev 1.18.2 --compile craftbukkit --remapped
java -jar BuildTools.jar --rev 1.19.4 --compile craftbukkit --remapped
java -jar BuildTools.jar --rev 1.20.1 --compile craftbukkit --remapped
java -jar BuildTools.jar --rev 1.20.4 --compile craftbukkit --remapped
- name: Install JDK 21
uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '21'
cache: 'maven'
- name: Install CraftBukkit 1.20.6, 1.21
# Use build number 4133 to compile CraftBukkit 1.20.5, see:
# https://hub.spigotmc.org/jira/browse/BUILDTOOLS-658
# https://hub.spigotmc.org/versions/
run: |
java -jar BuildTools.jar --rev 1.20.6 --compile craftbukkit --remapped
java -jar BuildTools.jar --rev 1.21 --compile craftbukkit --remapped
- name: Compile InvSee++
run: mvn clean package install --batch-mode --update-snapshots
- name: Create tagged release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
InvSee++_Plugin/target/InvSee++.jar
InvSee++_Give_Plugin/target/InvSee++_Give.jar
InvSee++_Clear_Plugin/target/InvSee++_Clear.jar
# No longer needed since the maven-release-plugin already does this.
# - name: Deploy to GitHub Packages
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# if: startsWith(github.ref, 'refs/tags/')
# run: mvn deploy
- name: Deploy Javadoc
uses: MathieuSoysal/Javadoc-publisher.yml@v2.4.0
if: github.ref == 'refs/heads/master'
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
javadoc-branch: javadoc
java-distribution: temurin
java-version: 22
custom-command: 'mvn package javadoc:aggregate -pl :invsee-plus-plus,:invsee-plus-plus_plugin,:invsee-plus-plus_common'
target-folder: javadoc
project: maven