fix: handle same-name tarball in release workflow

headlamp-plugin package already produces {name}-{version}.tar.gz,
so mv fails when source and destination are the same file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
DevContainer User
2026-03-04 01:45:37 +00:00
parent 2988af9926
commit 0882451c67
+4 -1
View File
@@ -81,7 +81,10 @@ jobs:
VERSION="${{ inputs.version }}"
PKG_NAME=$(jq -r .name package.json)
TARBALL="${PKG_NAME}-${VERSION}.tar.gz"
mv *.tar.gz "$TARBALL"
# Rename tarball if headlamp-plugin produced a different name
for f in *.tar.gz; do
[ "$f" != "$TARBALL" ] && mv "$f" "$TARBALL"
done
echo "TARBALL=$TARBALL" >> $GITHUB_ENV
echo "PKG_NAME=$PKG_NAME" >> $GITHUB_ENV