Skip to content

Commit 75ec382

Browse files
committed
Use full flags and add reasoning for use of tags
1 parent ba6b2e5 commit 75ec382

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/PublishNpm.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@ jobs:
2424
for tag in $(git tag --points-at HEAD); do
2525
package=${tag%-v*}
2626
version=${tag##*-v}
27-
jq -nc --arg p $package --arg v $version '{ package: $p, version: $v }'
27+
# Without a file argument, jq will wait for stdin, unless you specify --null-input.
28+
# By default jq pretty prints json. We need all of it on 1 line, so we use --compact-output here.
29+
jq --null-input --compact-output --arg p $package --arg v $version '{ package: $p, version: $v }'
2830
done
29-
) | jq -c --slurp '.'
31+
# The github outputs don't support unescaped newlines. So we use compact output here as well.
32+
) | jq --compact-output --slurp '.'
3033
)" >> "$GITHUB_OUTPUT"
3134
3235
publish:

0 commit comments

Comments
 (0)