Skip to content

Commit 8125809

Browse files
authored
fix(ci): add --tag beta for npm prerelease versions (#24)
Signed-off-by: cxhello <caixiaohuichn@gmail.com>
1 parent 7e08489 commit 8125809

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,13 @@ jobs:
7979
- name: Publish
8080
run: |
8181
echo "node $(node -v), npm $(npm -v)"
82-
cd nodejs && npm publish
82+
cd nodejs
83+
VER=$(node -p "require('./package.json').version")
84+
if echo "$VER" | grep -q '-'; then
85+
npm publish --tag beta
86+
else
87+
npm publish
88+
fi
8389
8490
github-release:
8591
needs: [check, push-tags, release-python, release-nodejs]

0 commit comments

Comments
 (0)