Skip to content

Commit 60877f1

Browse files
committed
build(release): optimize build and refine archive creation
- Enable ReadyToRun compilation for improved application startup performance. - Restructure build workflow to publish to a dedicated directory before creating the release archive. - Update main screenshot path in README. - Improve FAQ section readability in README with additional spacing.
1 parent 85b84b3 commit 60877f1

3 files changed

Lines changed: 17 additions & 7 deletions

File tree

.github/workflows/build-release.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,24 @@ jobs:
3737
--runtime win-x64 `
3838
--self-contained true `
3939
-p:PublishSingleFile=true `
40-
-p:ApplicationIcon=icon/app.ico `
40+
-p:PublishReadyToRun=true `
4141
-p:IncludeNativeLibrariesForSelfExtract=true `
4242
-p:EnableCompressionInSingleFile=true `
43-
--output ${{ env.OUTPUT_PATH }}
43+
-p:ApplicationIcon=icon/app.ico `
44+
--output publish_output
4445
- name: Create distribution archive
46+
shell: pwsh
4547
run: |
46-
$version = (Get-Item "${{ env.OUTPUT_PATH }}/ImToolbox.exe").VersionInfo.FileVersion
47-
$archiveName = "ImToolbox_v$version"
48-
Compress-Archive -Path "${{ env.OUTPUT_PATH }}/*" -DestinationPath "$archiveName.zip"
49-
echo "ARCHIVE_NAME=$archiveName.zip" >> $env:GITHUB_ENV
48+
$exePath = "publish_output/ImToolbox.exe"
49+
if (-not (Test-Path $exePath)) {
50+
throw "Executable not found at $exePath"
51+
}
52+
$version = (Get-Item $exePath).VersionInfo.FileVersion
53+
$archiveName = "ImToolbox_v$version.zip"
54+
New-Item -ItemType Directory -Path ${{ env.OUTPUT_PATH }} -Force
55+
Copy-Item -Path $exePath -Destination "${{ env.OUTPUT_PATH }}/ImToolbox.exe"
56+
Compress-Archive -Path "publish_output/*" -DestinationPath "${{ env.OUTPUT_PATH }}/$archiveName"
57+
echo "ARCHIVE_NAME=$archiveName" >> $env:GITHUB_ENV
5058
- name: Upload build artifact
5159
uses: actions/upload-artifact@v4
5260
with:

2026-02-25_125811_703.png

54.2 KB
Loading

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
### 🖼️ 截图预览
2323

2424
<div align="center">
25-
<img src="https://github.com/silvancoder/ImToolbox/raw/main/docs/screenshots/main_list.png" width="800" alt="输入法列表">
25+
<img src="2026-02-25_125811_703.png" alt="输入法列表">
2626
<p><em>沉浸式深色主题 UI - 输入法管理主界面</em></p>
2727
</div>
2828

@@ -81,9 +81,11 @@ dotnet publish ImToolbox/ImToolbox.csproj -c Release -r win-x64 --self-contained
8181
## ❓ 常见问题
8282

8383
**Q: 为什么会被杀毒软件拦截?**
84+
8485
A: 由于本工具需要向注册表 `HKCU\Keyboard Layout\Preload` 写入配置,部分杀软可能将其视为敏感操作。请放心,项目代码完全开源。
8586

8687
**Q: “键盘布局”和“输入法”有什么区别?**
88+
8789
A: “键盘布局”通常指纯英文字符映射(如 US),而“输入法 (TIP)”是复杂的文字输入服务(如微软拼音)。ImToolbox 在不同选项卡中分别管理它们,以实现更精细的控制。
8890

8991
---

0 commit comments

Comments
 (0)