Merge pull request 'jgitver' (#23) from jgitver into main
Some checks failed
CI / deploy (push) Failing after 4m48s

Reviewed-on: #23
This commit is contained in:
arindy 2025-02-11 21:42:15 +01:00
commit 468d9660c4
3 changed files with 57 additions and 14 deletions

View File

@ -11,6 +11,8 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup JDK
uses: actions/setup-java@v4
@ -19,7 +21,10 @@ jobs:
java-version: '21'
- name: Build Runner
run: ./mvnw --no-transfer-progress clean verify -Pnative -Dquarkus.native.remote-container-build=true
run: |
./mvnw -B --no-transfer-progress clean validate -Prelease
./mvnw -B --no-transfer-progress versions:commit
./mvnw -B --no-transfer-progress clean verify -Pnative -Dquarkus.native.remote-container-build=true -Djgitver.skip=true
- name: Add coverage to PR
id: jacoco
@ -38,3 +43,10 @@ jobs:
- name: Deploy
if: github.ref_name == 'main'
run: "docker compose up -d"
- name: create tag
if: github.ref_name == 'main'
run: |
version = var=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
git tag ${version} -m "release ${version}"
git push origin ${version}

View File

@ -1,13 +0,0 @@
<configuration xmlns="http://jgitver.github.io/maven/configuration/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jgitver.github.io/maven/configuration/1.1.0 https://jgitver.github.io/maven/configuration/jgitver-configuration-v1_1_0.xsd">
<strategy>MAVEN</strategy>
<policy>MAX</policy>
<autoIncrementPatch>true</autoIncrementPatch>
<useCommitDistance>true</useCommitDistance>
<useDirty>false</useDirty>
<useGitCommitId>true</useGitCommitId>
<gitCommitIdLength>8</gitCommitIdLength>
<nonQualifierBranches>main</nonQualifierBranches>
<useDefaultBranchingPolicy>true</useDefaultBranchingPolicy>
</configuration>

44
pom.xml
View File

@ -274,5 +274,49 @@
<quarkus.native.enabled>true</quarkus.native.enabled>
</properties>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>regex-property</id>
<goals>
<goal>regex-property</goal>
</goals>
<configuration>
<name>tag.version</name>
<value>${jgitver.calculated_version}</value>
<regex>-SNAPSHOT</regex>
<replacement></replacement>
<failIfNoMatch>true</failIfNoMatch>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.18.0</version>
<executions>
<execution>
<id>release-version</id>
<phase>validate</phase>
<goals>
<goal>set</goal>
</goals>
<configuration>
<newVersion>${tag.version}</newVersion>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>