File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Auto Build Plugin
2+
3+ on :
4+ push :
5+ branches : [ "main", "beta" ] # Chạy khi push code vào nhánh main hoặc master
6+ pull_request :
7+ branches : [ "alpha", "beta", "main" ]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Set up JDK 21 (Hoặc đổi số này theo version Java plugin bạn cần)
18+ uses : actions/setup-java@v4
19+ with :
20+ java-version : ' 17' # Minecraft 1.20.5+ cần Java 21, 1.18+ cần Java 17
21+ distribution : ' temurin'
22+ cache : maven
23+
24+ - name : Build with Maven
25+ run : mvn -B package --file pom.xml # Lệnh build chính
26+
27+ # BƯỚC QUAN TRỌNG NHẤT: Lưu file .jar lại để bạn tải về
28+ - name : Upload Artifact
29+ uses : actions/upload-artifact@v4
30+ with :
31+ name : My-Plugin-Jar
32+ path : target/*.jar # Đường dẫn file sau khi Maven build xong
You can’t perform that action at this time.
0 commit comments