Skip to content

Commit f2870bd

Browse files
committed
fix(scripts): add --tag next to npm publish for prereleases
1 parent ae70695 commit f2870bd

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

scripts/publish.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,17 @@ cat CHANGELOG.md >> "${RELEASE_NOTES_FILE}"
105105
echo "Made the release notes."
106106

107107
echo "Publishing to npm..."
108+
PUBLISH_ARGS=""
108109
if [[ $DRY_RUN != "" ]]; then
109110
echo "DRY RUN: running publish with --dry-run"
110-
npm publish --dry-run
111-
else
112-
npm publish
111+
PUBLISH_ARGS="--dry-run"
113112
fi
113+
114+
if [[ $PRE_RELEASE != "" ]]; then
115+
PUBLISH_ARGS="$PUBLISH_ARGS --tag next"
116+
fi
117+
118+
npm publish $PUBLISH_ARGS
114119
echo "Published to npm."
115120

116121
if [[ $PRE_RELEASE != "" ]]; then

0 commit comments

Comments
 (0)