Skip to content

Commit 1ac37f5

Browse files
committed
ci: take the packed tarball from its own directory
The prepare script prints to stdout, which broke parsing npm pack --json.
1 parent 69ae4ea commit 1ac37f5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎.github/workflows/release.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ jobs:
7777
echo "::error::Tag $TAG does not match package.json $VERSION"
7878
exit 1
7979
fi
80-
FILE="$(npm pack --json | node -e "process.stdout.write(JSON.parse(require('fs').readFileSync(0, 'utf8'))[0].filename)")"
80+
# The prepare script prints to stdout, so take the tarball from its own directory.
81+
mkdir "$RUNNER_TEMP/pack"
82+
npm pack --pack-destination "$RUNNER_TEMP/pack" >/dev/null
83+
FILE="$(ls "$RUNNER_TEMP/pack"/*.tgz)"
8184
{
8285
echo "version=$VERSION"
8386
echo "file=$FILE"

0 commit comments

Comments
 (0)