Compare commits

...

2 Commits

Author SHA1 Message Date
53fb52e294 Gitea Actions
All checks were successful
Build Minecraft Plugin / Build with Maven (push) Successful in 27s
2025-11-03 14:48:54 +08:00
b2011cecbb Update Maven 2025-11-03 14:47:04 +08:00
2 changed files with 39 additions and 2 deletions

View File

@@ -0,0 +1,32 @@
name: Build Minecraft Plugin
run-name: ${{ gitea.actor }} is building Minecraft plugin 🚀
on: [push, pull_request]
jobs:
build:
name: Build with Maven
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up JDK 21 and enable Maven cache
uses: actions/setup-java@v5
with:
distribution: 'liberica'
java-version: '21'
cache: 'maven'
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.11
- name: Build and package with Maven
run: mvn -B package
- name: Upload built artifacts
uses: actions/upload-artifact@v3
with:
name: maven-artifacts
path: target/spigot/*.jar

View File

@@ -22,7 +22,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version> <version>3.14.1</version>
<configuration> <configuration>
<source>${java.version}</source> <source>${java.version}</source>
<target>${java.version}</target> <target>${java.version}</target>
@@ -31,7 +31,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>3.5.3</version> <version>3.6.1</version>
<executions> <executions>
<execution> <execution>
<phase>package</phase> <phase>package</phase>
@@ -40,6 +40,11 @@
</goals> </goals>
</execution> </execution>
</executions> </executions>
<configuration>
<finalName>${project.artifactId}-spigot-${project.version}</finalName>
<outputDirectory>${project.build.directory}/spigot</outputDirectory>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
<resources> <resources>