更新 CD 工作流 (#11140)

* Update cd.yml

* Update win-build.bat

if errorlevel 1 实际上是在检查errorlevel是否大于或等于1,这是检查命令是否失败的标准做法。

* Update cd.yml
This commit is contained in:
绛亽 2024-04-25 19:11:00 +08:00 committed by GitHub
parent 5536545f22
commit 4ce87c7eb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 7 deletions

View file

@ -5,6 +5,9 @@ echo 'Building UI'
cd app
call pnpm install
call pnpm run build
if errorlevel 1 (
exit /b %errorlevel%
)
cd ..
echo 'Cleaning Builds'
@ -26,13 +29,18 @@ set GOOS=windows
set GOARCH=amd64
@REM you can use `go mod tidy` to update kernel dependency before build
go build --tags fts5 -v -o "../app/kernel/SiYuan-Kernel.exe" -ldflags "-s -w -H=windowsgui" .
if errorlevel 1 (
exit /b %errorlevel%
)
cd ..
echo 'Building Electron'
cd app
call pnpm run dist
if errorlevel 1 (
exit /b %errorlevel%
)
cd ..
echo 'Building Appx'