Skip to content

Commit ae6acf4

Browse files
authored
Update GitHub Actions build workflow for Java project
1 parent d0bad37 commit ae6acf4

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build Paper Plugin
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
# 🔹 1. Repo auschecken
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
# 🔹 2. Java 21 installieren (Temurin = OpenJDK)
19+
- name: Set up JDK 21
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: 'temurin'
23+
java-version: '21'
24+
cache: 'gradle'
25+
26+
# 🔹 3. Rechte für Gradle-Wrapper setzen
27+
- name: Grant execute permission for Gradle wrapper
28+
run: chmod +x gradlew
29+
30+
# 🔹 4. Projekt bauen & Tests ausführen
31+
- name: Build with Gradle
32+
uses: gradle/gradle-build-action@v3
33+
with:
34+
arguments: clean build
35+
36+
# 🔹 5. Artefakt (JAR) hochladen
37+
- name: Upload plugin jar
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: UtilsManager
41+
path: build/libs/*.jar

0 commit comments

Comments
 (0)