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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user