forked from UltraCosmetics/UltraCosmetics
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (55 loc) · 1.96 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
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
name: Build Gradle
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-24.04
steps:
# https://github.com/actions/checkout
- name: Check out Git repository
uses: actions/[email protected]
# https://github.com/gradle/gradle-build-action
- name: Setup Gradle
uses: gradle/actions/[email protected]
# https://github.com/gradle/wrapper-validation-action
- name: Wrapper validation
uses: gradle/actions/[email protected]
# https://github.com/actions/setup-java
- name: Set up JDK 17
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '17'
java-package: jdk
architecture: x64
cache: gradle
# https://github.com/actions/setup-java
- name: Set up JDK 21
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '21'
java-package: jdk
architecture: x64
cache: gradle
# https://hub.spigotmc.org/jenkins/job/BuildTools
- name: Download BuildTools
run: wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
- name: Build MC 1.20.6
run: java -jar BuildTools.jar --rev 1.20.6 --remapped
- name: Build MC 1.21.3
run: java -jar BuildTools.jar --rev 1.21.3 --remapped
- name: Configure Git
run: git config --global user.name "Github Actions" && git config --global user.email "[email protected]"
- name: Make Gradlew executable
run: chmod +x ./gradlew
- name: Build project
run: ./gradlew obfuscate --no-daemon
# https://github.com/actions/upload-artifact
- name: Upload build artifact
uses: actions/[email protected]
with:
name: UltraCosmetics-dev
path: build/libs/UltraCosmetics-*.jar