feature: publish jar to the maven artifact registry on gitea #27

Closed
antoine wants to merge 1 commits from feature/maven-publish into main
4 changed files with 31 additions and 3 deletions

View File

@ -16,4 +16,6 @@ jobs:
with:
distribution: 'temurin'
java-version: '21'
- run: ./mvnw verify jib:build
settings-path: './'
- run: ./mvnw verify deploy
# - run: ./mvnw verify jib:build

View File

@ -14,4 +14,4 @@ jobs:
with:
distribution: 'temurin'
java-version: '21'
- run: ./mvnw verify
- run: ./mvnw verify deploy

11
pom.xml
View File

@ -126,7 +126,16 @@
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>gitea</id>
<url>https://antoine-roux.tk/projects/api/packages/java-template/maven</url>
</repository>
<snapshotRepository>
<id>gitea</id>
<url>https://antoine-roux.tk/projects/api/packages/java-template/maven</url>
</snapshotRepository>
</distributionManagement>
</project>

17
settings.xml Normal file
View File

@ -0,0 +1,17 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>gitea</id>
<configuration>
<httpHeaders>
<property>
<name>Authorization</name>
<value>token ${env.GITEA_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
</settings>