Skip to content

Commit faf7509

Browse files
committed
🔖 Release v3.0.12
1 parent 4812e00 commit faf7509

File tree

6 files changed

+118
-118
lines changed

6 files changed

+118
-118
lines changed

.github/workflows/release.yml

Lines changed: 111 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
env:
1111
repo_name_android: "siyuan-android"
1212
repo_name: "siyuan"
13-
repo_owner: "siyuan-note"
13+
repo_owner: "siyuan-community"
1414
package_json: "app/package.json"
1515

1616
jobs:
@@ -31,7 +31,7 @@ jobs:
3131
with:
3232
python-version: "3.10"
3333
- run: pip install PyGithub
34-
34+
3535
- id: thislatestR
3636
uses: pozetroninc/github-action-get-latest-release@master
3737
with:
@@ -45,7 +45,7 @@ jobs:
4545
id: release_info
4646
run: |
4747
echo "release_title=$(git show --format=%s --no-patch | head -1)" >> $GITHUB_OUTPUT
48-
echo "release_version=$(TZ=Asia/Shanghai date +'v%Y%m%d%H%M')" >> $GITHUB_OUTPUT
48+
echo "release_version=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
4949
changelog=$(python scripts/parse-changelog.py -t ${{ github.ref }} -b ${{ steps.thislatestR.outputs.release }} ${{ env.repo_owner }}/${{ env.repo_name }})
5050
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
5151
echo "release_body<<$EOF" >> $GITHUB_ENV
@@ -58,13 +58,13 @@ jobs:
5858
uses: sergeysova/jq-action@v2
5959
id: version
6060
with:
61-
cmd: 'jq .version ${{ env.package_json }} -r'
61+
cmd: "jq .version ${{ env.package_json }} -r"
6262

6363
- name: Extract packageManager from package.json
6464
uses: sergeysova/jq-action@v2
6565
id: packageManager
6666
with:
67-
cmd: "jq .packageManager ${{ env.package_json }} -r"
67+
cmd: "jq .packageManager ${{ env.package_json }} -r"
6868

6969
- name: Create Release
7070
id: create_release
@@ -84,7 +84,7 @@ jobs:
8484
strategy:
8585
matrix:
8686
config:
87-
- os: ubuntu-22.04
87+
- os: ubuntu-latest
8888
name: ubuntu build linux.AppImage
8989
kernel_path: "../app/kernel-linux/SiYuan-Kernel"
9090
build_args_prefix: "-s -w -X"
@@ -93,7 +93,7 @@ jobs:
9393
goos: "linux"
9494
goarch: "amd64"
9595
suffix: "linux.AppImage"
96-
- os: ubuntu-22.04
96+
- os: ubuntu-latest
9797
name: ubuntu build linux.tar.gz
9898
kernel_path: "../app/kernel-linux/SiYuan-Kernel"
9999
build_args_prefix: "-s -w -X"
@@ -102,7 +102,7 @@ jobs:
102102
goos: "linux"
103103
goarch: "amd64"
104104
suffix: "linux.tar.gz"
105-
- os: macos-latest
105+
- os: macos-latest-large
106106
name: macos build mac.dmg
107107
kernel_path: "../app/kernel-darwin/SiYuan-Kernel"
108108
build_args_prefix: "-s -w -X"
@@ -111,7 +111,7 @@ jobs:
111111
goos: "darwin"
112112
goarch: "amd64"
113113
suffix: "mac.dmg"
114-
- os: macos-latest
114+
- os: macos-latest-xlarge
115115
name: macos build mac-arm64.dmg
116116
kernel_path: "../app/kernel-darwin-arm64/SiYuan-Kernel"
117117
build_args_prefix: "-s -w -X"
@@ -133,105 +133,105 @@ jobs:
133133
suffix: "win.exe"
134134

135135
steps:
136-
- uses: actions/checkout@v4
137-
with:
138-
path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}
139-
140-
- name: Set up MingGW
141-
uses: msys2/setup-msys2@v2
142-
if: "contains( matrix.config.goos, 'windows')"
143-
with:
144-
install: p7zip mingw-w64-x86_64-lua
145-
146-
- name: Set up TDM-GCC
147-
run: msys2 -c "bash go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/scripts/get-tdm-gcc.sh tdm https://github.com/jmeubank/tdm-gcc/releases/download/v10.3.0-tdm-1/tdm-gcc-10.3.0.exe" && echo "CC=${{ github.workspace }}/tdm/bin/gcc.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
148-
if: "contains( matrix.config.goarch, '386')"
149-
working-directory: ${{ github.workspace }}
150-
151-
- name: Set up Go
152-
uses: actions/setup-go@v5
153-
with:
154-
go-version-file: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/kernel/go.mod
155-
- run: go version
156-
157-
- name: Set up goversioninfo
158-
run: go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo && go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo
159-
if: "contains( matrix.config.goos, 'windows')"
160-
working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/kernel
161-
env:
162-
GO111MODULE: on
163-
CGO_ENABLED: 1
164-
GOOS: ${{ matrix.config.goos }}
165-
GOPATH: ${{ github.workspace }}/go
166-
GOARCH: ${{ matrix.config.goarch }}
167-
168-
- name: Set up Node
169-
uses: actions/setup-node@v4
170-
with:
171-
node-version: 20
172-
173-
- name: Install Node pnpm
174-
run: npm install -g ${{ needs.create_release.outputs.packageManager }}
175-
working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app
176-
177-
- name: Install Node Dependencies
178-
run: pnpm install --no-frozen-lockfile
179-
working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app
180-
181-
- name: Building UI
182-
run: pnpm run build
183-
working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app
184-
185-
- name: Remove Build Directory
186-
uses: JesseTG/rm@v1.0.2
187-
with:
188-
path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/build
189-
190-
- name: Remove Kernel Directory for Linux
191-
uses: JesseTG/rm@v1.0.2
192-
with:
193-
path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/kernel-linux
194-
195-
- name: Remove Kernel Directory for Windows
196-
uses: JesseTG/rm@v1.0.2
197-
with:
198-
path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/kernel
199-
200-
- name: Remove Kernel Directory for macOS
201-
uses: JesseTG/rm@v1.0.2
202-
with:
203-
path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/kernel-darwin
204-
205-
- name: Remove Kernel Directory for macOS ARM64
206-
uses: JesseTG/rm@v1.0.2
207-
with:
208-
path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/kernel-darwin-arm64
209-
210-
- name: Generate Icon Resource and Properties/Version Info For Windows
211-
run: ${{ github.workspace }}\go\${{ matrix.config.gobin }}\goversioninfo -platform-specific=true -icon="resource\icon.ico" -manifest="resource\goversioninfo.exe.manifest"
212-
if: "contains( matrix.config.goos, 'windows')"
213-
working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/kernel
214-
215-
- name: Building Kernel
216-
run: go build --tags fts5 -o "${{ matrix.config.kernel_path }}" -v -ldflags "${{ matrix.config.build_args_prefix }} github.com/${{ env.repo_owner }}/${{ env.repo_name }}/kernel/util.${{ matrix.config.build_args_suffix }}"
217-
working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/kernel
218-
env:
219-
GO111MODULE: on
220-
CGO_ENABLED: 1
221-
GOOS: ${{ matrix.config.goos }}
222-
GOPATH: ${{ github.workspace }}/go
223-
GOARCH: ${{ matrix.config.goarch }}
224-
225-
- name: Building Electron
226-
run: pnpm run ${{ matrix.config.electron_args }}
227-
working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app
228-
229-
- name: Upload Release
230-
uses: actions/upload-release-asset@v1
231-
env:
232-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
233-
with:
234-
upload_url: ${{ needs.create_release.outputs.upload_url }}
235-
asset_name: siyuan-${{ needs.create_release.outputs.release_version }}-${{ matrix.config.suffix }}
236-
asset_path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/build/siyuan-${{ needs.create_release.outputs.version }}-${{ matrix.config.suffix }}
237-
asset_content_type: application/octet-stream
136+
- uses: actions/checkout@v4
137+
with:
138+
path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}
139+
140+
- name: Set up MingGW
141+
uses: msys2/setup-msys2@v2
142+
if: "contains( matrix.config.goos, 'windows')"
143+
with:
144+
install: p7zip mingw-w64-x86_64-lua
145+
146+
- name: Set up TDM-GCC
147+
run: msys2 -c "bash go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/scripts/get-tdm-gcc.sh tdm https://github.com/jmeubank/tdm-gcc/releases/download/v10.3.0-tdm-1/tdm-gcc-10.3.0.exe" && echo "CC=${{ github.workspace }}/tdm/bin/gcc.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
148+
if: "contains( matrix.config.goarch, '386')"
149+
working-directory: ${{ github.workspace }}
150+
151+
- name: Set up Go
152+
uses: actions/setup-go@v5
153+
with:
154+
go-version-file: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/kernel/go.mod
155+
- run: go version
156+
157+
- name: Set up goversioninfo
158+
run: go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo && go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo
159+
if: "contains( matrix.config.goos, 'windows')"
160+
working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/kernel
161+
env:
162+
GO111MODULE: on
163+
CGO_ENABLED: 1
164+
GOOS: ${{ matrix.config.goos }}
165+
GOPATH: ${{ github.workspace }}/go
166+
GOARCH: ${{ matrix.config.goarch }}
167+
168+
- name: Set up Node
169+
uses: actions/setup-node@v4
170+
with:
171+
node-version: 20
172+
173+
- name: Install Node pnpm
174+
run: npm install -g ${{ needs.create_release.outputs.packageManager }}
175+
working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app
176+
177+
- name: Install Node Dependencies
178+
run: pnpm install --no-frozen-lockfile
179+
working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app
180+
181+
- name: Building UI
182+
run: pnpm run build
183+
working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app
184+
185+
- name: Remove Build Directory
186+
uses: JesseTG/rm@v1.0.2
187+
with:
188+
path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/build
189+
190+
- name: Remove Kernel Directory for Linux
191+
uses: JesseTG/rm@v1.0.2
192+
with:
193+
path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/kernel-linux
194+
195+
- name: Remove Kernel Directory for Windows
196+
uses: JesseTG/rm@v1.0.2
197+
with:
198+
path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/kernel
199+
200+
- name: Remove Kernel Directory for macOS
201+
uses: JesseTG/rm@v1.0.2
202+
with:
203+
path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/kernel-darwin
204+
205+
- name: Remove Kernel Directory for macOS ARM64
206+
uses: JesseTG/rm@v1.0.2
207+
with:
208+
path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/kernel-darwin-arm64
209+
210+
- name: Generate Icon Resource and Properties/Version Info For Windows
211+
run: ${{ github.workspace }}\go\${{ matrix.config.gobin }}\goversioninfo -platform-specific=true -icon="resource\icon.ico" -manifest="resource\goversioninfo.exe.manifest"
212+
if: "contains( matrix.config.goos, 'windows')"
213+
working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/kernel
214+
215+
- name: Building Kernel
216+
run: go build --tags fts5 -o "${{ matrix.config.kernel_path }}" -v -ldflags "${{ matrix.config.build_args_prefix }} github.com/${{ env.repo_owner }}/${{ env.repo_name }}/kernel/util.${{ matrix.config.build_args_suffix }}"
217+
working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/kernel
218+
env:
219+
GO111MODULE: on
220+
CGO_ENABLED: 1
221+
GOOS: ${{ matrix.config.goos }}
222+
GOPATH: ${{ github.workspace }}/go
223+
GOARCH: ${{ matrix.config.goarch }}
224+
225+
- name: Building Electron
226+
run: pnpm run ${{ matrix.config.electron_args }}
227+
working-directory: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app
228+
229+
- name: Upload Release
230+
uses: actions/upload-release-asset@v1
231+
env:
232+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
233+
with:
234+
upload_url: ${{ needs.create_release.outputs.upload_url }}
235+
asset_name: siyuan-CE-${{ needs.create_release.outputs.release_version }}-${{ matrix.config.suffix }}
236+
asset_path: ${{ github.workspace }}/go/src/github.com/${{ env.repo_owner }}/${{ env.repo_name }}/app/build/siyuan-${{ needs.create_release.outputs.version }}-${{ matrix.config.suffix }}
237+
asset_content_type: application/octet-stream

app/electron/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,8 @@ if (!app.isPackaged) {
672672
for (let i = argStart; i < process.argv.length; i++) {
673673
let arg = process.argv[i];
674674
if (arg.startsWith("siyuan://")
675-
|| arg.startsWith("--workspace=")
676675
|| arg.startsWith("--openAsHidden")
676+
|| arg.startsWith("--workspace=")
677677
|| arg.startsWith("--port=")
678678
|| arg.startsWith("--proxy=")
679679
|| arg.startsWith("--remote=")
@@ -870,7 +870,7 @@ app.whenReady().then(() => {
870870
event.sender.send("siyuan-event", "leave-full-screen");
871871
});
872872
});
873-
ipcMain.on("siyuan-cmd", async (event, data) => {
873+
ipcMain.on("siyuan-cmd", (event, data) => {
874874
let cmd = data;
875875
let webContentsId = event.sender.id;
876876
if (typeof data !== "string") {
@@ -1233,7 +1233,7 @@ app.whenReady().then(() => {
12331233
new URL(remote);
12341234
localhost = false;
12351235
baseURL = remote;
1236-
boot();
1236+
initMainWindow();
12371237
} catch (e) {
12381238
writeLog(`remote URL ["${remote}"] is invalid`);
12391239
const errorWindowId = showErrorWindow("⚠️ 远程服务 URL 无效 The remote service URL is invalid", `<div>所设置的远程内核服务 URL [${remote}] 不是有效的 URL!</div><div>The remote kernel service URL [${remote}] that you set is not a valid URL!</div>`);

kernel/conf/editor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package conf
1818

19-
import "github.com/siyuan-note/siyuan/kernel/util"
19+
import "github.com/siyuan-community/siyuan/kernel/util"
2020

2121
type Editor struct {
2222
AllowHTMLBLockScript bool `json:"allowHTMLBLockScript"` // 允许执行 HTML 块内脚本

kernel/go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ require (
7474

7575
require (
7676
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
77-
github.com/cloudflare/circl v1.3.7 // indirect
77+
github.com/cloudflare/circl v1.3.8 // indirect
7878
github.com/golang/protobuf v1.5.3 // indirect
7979
github.com/google/go-querystring v1.1.0 // indirect
8080
golang.org/x/oauth2 v0.8.0 // indirect
@@ -95,7 +95,6 @@ require (
9595
github.com/bytedance/sonic v1.11.6 // indirect
9696
github.com/bytedance/sonic/loader v0.1.1 // indirect
9797
github.com/cespare/xxhash/v2 v2.3.0 // indirect
98-
github.com/cloudflare/circl v1.3.8 // indirect
9998
github.com/cloudwego/base64x v0.1.4 // indirect
10099
github.com/cloudwego/iasm v0.2.0 // indirect
101100
github.com/dlclark/regexp2 v1.11.0 // indirect

kernel/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,15 @@ github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef h1:2JGTg6JapxP
5454
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef/go.mod h1:JS7hed4L1fj0hXcyEejnW57/7LCetXggd+vwrRnYeII=
5555
github.com/aws/aws-sdk-go v1.51.28 h1:x3CV5xjnL4EbVLaPXulBOxqiq2dkc9o6+50xxT3tvXY=
5656
github.com/aws/aws-sdk-go v1.51.28/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
57+
github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
5758
github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=
5859
github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
5960
github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
6061
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
6162
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
6263
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
6364
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
65+
github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I=
6466
github.com/cloudflare/circl v1.3.8 h1:j+V8jJt09PoeMFIu2uh5JUyEaIHTXVOHslFoLNAKqwI=
6567
github.com/cloudflare/circl v1.3.8/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU=
6668
github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=

kernel/model/repository.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import (
4141
"github.com/88250/lute/html"
4242
"github.com/88250/lute/parse"
4343
"github.com/88250/lute/render"
44-
"github.com/dustin/go-humanize"
4544
"github.com/siyuan-community/siyuan/kernel/cache"
4645
"github.com/siyuan-community/siyuan/kernel/conf"
4746
"github.com/siyuan-community/siyuan/kernel/filesys"

0 commit comments

Comments
 (0)