Skip to content

Commit

Permalink
改进 Sillot CI/CD 工作流 #655
Browse files Browse the repository at this point in the history
  • Loading branch information
Soltus committed Apr 25, 2024
1 parent e6d4990 commit c02eabe
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: ${{ github.workspace }}/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/kernel/go.mod
- run: go version

- name: Set up goversioninfo
run: go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo && go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sillot",
"version": "0.31.1500",
"version": "0.31.1600",
"syv": "3.0.12",
"sypv": "[]",
"description": "Build Your Eternal Digital Garden",
Expand Down
8 changes: 7 additions & 1 deletion scripts/sillot-android-build-action.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ cd kernel
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
gomobile bind --tags fts5 -ldflags "-s -w" -v -o kernel.aar -target="android/arm64" -androidapi 30 ./mobile/
if errorlevel 1 (
exit /b %errorlevel%
)
cd ..
python .\scripts\sillot-android-dev.py
echo ===== all jobs done. =====
if errorlevel 1 (
exit /b %errorlevel%
)
echo ===== all jobs done. =====
11 changes: 10 additions & 1 deletion scripts/sillot-android-build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ echo ===== Building UI =====
cd app
call pnpm install
call pnpm run build
if errorlevel 1 (
exit /b %errorlevel%
)
cd ..

echo ===== Building Kernel lib =====
Expand All @@ -13,6 +16,12 @@ cd kernel
@REM go install golang.org/x/mobile/cmd/gomobile@latest
@REM gomobile init
gomobile bind --tags fts5 -ldflags "-s -w" -v -o kernel.aar -target="android/arm64" -androidapi 30 ./mobile/
if errorlevel 1 (
exit /b %errorlevel%
)
cd ..
python .\scripts\sillot-android-dev.py
echo ===== all jobs done. =====
if errorlevel 1 (
exit /b %errorlevel%
)
echo ===== all jobs done. =====
6 changes: 6 additions & 0 deletions scripts/sillot-win-build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,19 @@ set GOARCH=amd64
@REM you can use `go mod tidy` to update kernel dependency bofore build
go mod tidy
go build --tags fts5 -v -o "../app/kernel/SiYuan-Sillot-Kernel.exe" -ldflags "-s -w -H=windowsgui" .
if errorlevel 1 (
exit /b %errorlevel%
)

cd ..

echo ===== Building Electron =====
echo 'for first run, maybe you need to run `pnpm config set electron_mirror "https://npm.taobao.org/mirrors/electron/"`'
cd app
call pnpm run dist
if errorlevel 1 (
exit /b %errorlevel%
)

cd ..

Expand Down

0 comments on commit c02eabe

Please sign in to comment.