build: Add releaser plugin
This commit is contained in:
parent
03c38c80a0
commit
86bf3ffb15
2 changed files with 146 additions and 0 deletions
128
pom.xml
128
pom.xml
|
@ -5,6 +5,8 @@
|
|||
<artifactId>mstats</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
|
||||
<description>mStats Quarkus server</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.release>17</maven.compiler.release>
|
||||
|
||||
|
@ -19,6 +21,10 @@
|
|||
<surefire-plugin.version>3.5.2</surefire-plugin.version>
|
||||
|
||||
<skipITs>true</skipITs>
|
||||
|
||||
<!-- release config -->
|
||||
<executable-suffix/>
|
||||
<distribution.directory>${project.build.directory}/distributions</distribution.directory>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
|
@ -137,7 +143,17 @@
|
|||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
|
||||
</plugins>
|
||||
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>kr.motd.maven</groupId>
|
||||
<artifactId>os-maven-plugin</artifactId>
|
||||
<version>1.7.1</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
|
@ -153,5 +169,117 @@
|
|||
<quarkus.native.enabled>true</quarkus.native.enabled>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>dist</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<configuration>
|
||||
<attach>false</attach>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<finalName>${project.artifactId}-${project.version}-${os.detected.classifier}</finalName>
|
||||
<outputDirectory>${distribution.directory}</outputDirectory>
|
||||
<workDirectory>${project.build.directory}/assembly/work</workDirectory>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/assembly.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>make-distribution</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>dist-windows</id>
|
||||
<activation>
|
||||
<os>
|
||||
<family>windows</family>
|
||||
</os>
|
||||
</activation>
|
||||
<properties>
|
||||
<executable-suffix>.exe</executable-suffix>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jreleaser</groupId>
|
||||
<artifactId>jreleaser-maven-plugin</artifactId>
|
||||
<version>1.6.0</version>
|
||||
<configuration>
|
||||
<jreleaser>
|
||||
<project>
|
||||
<!-- TODO move this out also add versions to properties -->
|
||||
<links>
|
||||
<homepage>https://git.m724.eu/Minecon724/mStats</homepage>
|
||||
<documentation>https://git.m724.eu/Minecon724/mStats</documentation>
|
||||
</links>
|
||||
<license>GPL-3.0</license>
|
||||
<authors>mStats contributors</authors>
|
||||
<copyright>© 2025 mStats contributors</copyright>
|
||||
</project>
|
||||
<release>
|
||||
<gitea>
|
||||
<apiEndpoint>https://git.m724.eu</apiEndpoint>
|
||||
<host>git.m724.eu</host>
|
||||
<owner>Minecon724</owner>
|
||||
|
||||
<draft>true</draft>
|
||||
|
||||
<changelog>
|
||||
<formatted>ALWAYS</formatted>
|
||||
<preset>conventional-commits</preset>
|
||||
</changelog>
|
||||
</gitea>
|
||||
</release>
|
||||
<upload>
|
||||
<gitea>
|
||||
<mstats>
|
||||
<active>ALWAYS</active>
|
||||
<host>git.m724.eu</host>
|
||||
<owner>Minecon724</owner>
|
||||
</mstats>
|
||||
</gitea>
|
||||
</upload>
|
||||
<distributions>
|
||||
<mstats>
|
||||
<type>BINARY</type>
|
||||
<artifacts>
|
||||
<artifact>
|
||||
<path>${distribution.directory}/{{distributionName}}-{{projectVersion}}-linux-x86_64.tar.gz</path>
|
||||
<platform>linux-x86_64</platform>
|
||||
</artifact>
|
||||
<artifact>
|
||||
<path>${distribution.directory}/{{distributionName}}-{{projectVersion}}-windows-x86_64.zip</path>
|
||||
<platform>windows-x86_64</platform>
|
||||
</artifact>
|
||||
<artifact>
|
||||
<path>${distribution.directory}/{{distributionName}}-{{projectVersion}}-osx-x86_64.zip</path>
|
||||
<platform>osx-x86_64</platform>
|
||||
</artifact>
|
||||
</artifacts>
|
||||
</mstats>
|
||||
</distributions>
|
||||
</jreleaser>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
18
src/main/assembly/assembly.xml
Normal file
18
src/main/assembly/assembly.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<assembly
|
||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
|
||||
<id>dist</id>
|
||||
<formats>
|
||||
<format>tar.gz</format>
|
||||
<format>zip</format>
|
||||
<format>dir</format>
|
||||
</formats>
|
||||
<files>
|
||||
<file>
|
||||
<source>${project.build.directory}/${project.artifactId}-${project.version}-runner${executable-suffix}</source>
|
||||
<outputDirectory>./bin</outputDirectory>
|
||||
<destName>${project.artifactId}${executable-suffix}</destName>
|
||||
</file>
|
||||
</files>
|
||||
</assembly>
|
Loading…
Add table
Reference in a new issue