Skip to content

Commit c8f1667

Browse files
author
Tenny
committed
ci: 优化脚本
Signed-off-by: Tenny <tenny.shu@foxmail.com>
1 parent 12d1eb3 commit c8f1667

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

scripts/publish.ps1

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
Write-Host '您好'
1+
param ($Cmd = $(throw "Command parameter is required."))
2+
3+
if ($Cmd -eq "push") {
4+
Write-Host "push..."
5+
} elseif (($Cmd -eq "pull") -or ($Cmd -eq "publish")) {
6+
git pull origin main
7+
pnpm lib:build
8+
npm publish --registry https://registry.npmjs.org/
9+
git checkout dev
10+
git merge main
11+
12+
Write-Host " "
13+
}

0 commit comments

Comments
 (0)