Update .github/workflows/maven-publish.yml

This commit is contained in:
stjepan.cvitanovic 2025-03-24 11:18:38 +01:00
parent dc34f2e608
commit 5b5a06a7ee

View File

@ -67,6 +67,7 @@ jobs:
GROUP_ID=$(mvn help:evaluate -Dexpression="project.groupId" -q -DforceStdout)
ARTIFACT_ID=$(mvn help:evaluate -Dexpression="project.artifactId" -q -DforceStdout)
VERSION=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout)
FINAL_NAME=$(mvn help:evaluate -Dexpression="project.build.finalName" -q -DforceStdout)
if [[ $VERSION == *SNAPSHOT ]];
then
echo "Version $VERSION is snapshot version, proceeding with upload to local-nexus snapshots"
@ -86,7 +87,7 @@ jobs:
-Durl=https://devops.pravilanovait.hr/nexus/repository/maven-snapshots \
-Dpackaging=$PACKAGING -DgroupId=$GROUP_ID -DartifactId=$ARTIFACT_ID \
-Dversion=$VERSION -DrepositoryId=local-nexus \
-Dfile=target/$ARTIFACT_ID-$VERSION.$PACKAGING
-Dfile=target/$FINAL_NAME.$PACKAGING
fi
else
echo "Version $VERSION is not snapshot version, not uploading to local-nexus snapshots"