fix: handle tarball already having correct name in release workflow

The headlamp-plugin package command already produces a tarball named
{pkg}-{version}.tar.gz, so the mv command 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 02:01:04 +00:00
parent 2da1fb3099
commit a46d0e7519
+4 -1
View File
@@ -71,7 +71,10 @@ jobs:
VERSION="${{ inputs.version }}"
PKG_NAME=$(jq -r .name package.json)
TARBALL="${PKG_NAME}-${VERSION}.tar.gz"
mv *.tar.gz "$TARBALL"
ACTUAL=$(ls *.tar.gz)
if [ "$ACTUAL" != "$TARBALL" ]; then
mv "$ACTUAL" "$TARBALL"
fi
echo "TARBALL=$TARBALL" >> $GITHUB_ENV
echo "PKG_NAME=$PKG_NAME" >> $GITHUB_ENV