Skip to content

Commit da547ba

Browse files
committed
add release correct
Signed-off-by: see-quick <maros.orsak159@gmail.com>
1 parent 56e0993 commit da547ba

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@ jobs:
3030

3131
- name: Rename jar for release
3232
run: |
33-
mv target/strimzi-mcp-server-*-SNAPSHOT.jar target/strimzi-mcp-server-${{ steps.version.outputs.VERSION }}.jar 2>/dev/null || \
34-
mv target/strimzi-mcp-server-*.jar target/strimzi-mcp-server-${{ steps.version.outputs.VERSION }}.jar
33+
TARGET_JAR="target/strimzi-mcp-server-${{ steps.version.outputs.VERSION }}.jar"
34+
if [ -f "$TARGET_JAR" ]; then
35+
echo "Jar already has correct name: $TARGET_JAR"
36+
elif ls target/strimzi-mcp-server-*-SNAPSHOT.jar 1>/dev/null 2>&1; then
37+
mv target/strimzi-mcp-server-*-SNAPSHOT.jar "$TARGET_JAR"
38+
else
39+
mv target/strimzi-mcp-server-*.jar "$TARGET_JAR"
40+
fi
3541
3642
- name: Create Release
3743
uses: softprops/action-gh-release@v2

0 commit comments

Comments
 (0)