We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d05780 commit 347cd2fCopy full SHA for 347cd2f
.github/workflows/publish-npm.yml
@@ -111,6 +111,10 @@ jobs:
111
fi
112
# Use path.resolve to safely construct the absolute path
113
VERSION=$(node -e "const path = require('path'); const pkgPath = path.resolve('$PKG_DIR', 'package.json'); const pkg = require(pkgPath); console.log(pkg.version);")
114
+ if [ -z "$VERSION" ]; then
115
+ echo "❌ Failed to extract version from $PKG_DIR/package.json. Ensure the file exists and contains a valid 'version' field." >&2
116
+ exit 1
117
+ fi
118
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
119
echo "Extracted version: $VERSION from $PKG_DIR/package.json"
120
shell: bash
0 commit comments