Update .github/workflows/maven-publish.yml

This commit is contained in:
stjepan.cvitanovic 2025-03-21 11:23:37 +01:00
parent b2206217ed
commit f11e42863f

View File

@ -67,9 +67,9 @@ jobs:
GROUP_ID=$(mvn help:evaluate -Dexpression="project.groupId" -q -DforceStdout) GROUP_ID=$(mvn help:evaluate -Dexpression="project.groupId" -q -DforceStdout)
ARTIFACT_ID=$(mvn help:evaluate -Dexpression="project.artifactId" -q -DforceStdout) ARTIFACT_ID=$(mvn help:evaluate -Dexpression="project.artifactId" -q -DforceStdout)
VERSION=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout) VERSION=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout)
if [ $VERSION == *-SNAPSHOT ]; if [ $VERSION == *SNAPSHOT ];
then then
echo "Version is snapshot version, proceeding with upload to local-nexus snapshots" echo "Version $VERSION is snapshot version, proceeding with upload to local-nexus snapshots"
PACKAGING=$(mvn help:evaluate -Dexpression="project.packaging" -q -DforceStdout) PACKAGING=$(mvn help:evaluate -Dexpression="project.packaging" -q -DforceStdout)
echo "Uploading artifact for $GROUP_ID:$ARTIFACT_ID:$VERSION" echo "Uploading artifact for $GROUP_ID:$ARTIFACT_ID:$VERSION"
if [ $PACKAGING == "pom" ]; if [ $PACKAGING == "pom" ];
@ -89,7 +89,7 @@ jobs:
-Dfile=target/$ARTIFACT_ID-$VERSION.$PACKAGING -Dfile=target/$ARTIFACT_ID-$VERSION.$PACKAGING
fi fi
else else
echo "Version is not snapshot version, not uploading to local-nexus snapshots" echo "Version $VERSION is not snapshot version, not uploading to local-nexus snapshots"
fi fi
env: env: