Skip to content

Commit 10d9e28

Browse files
committed
ci: update GitHub Actions workflow to include app icon in build
- Add AppIcon.icns copying to CI build process - Add CFBundleVersion to Info.plist in workflow - Add NSAccessibilityUsageDescription for proper permissions
1 parent f0147af commit 10d9e28

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@ jobs:
2222
# 创建目录结构
2323
mkdir -p dist/MacVimSwitch.app/Contents/{MacOS,Resources}
2424
25-
# 复制 Info.plist
25+
# 复制 Info.plist 和应用图标
2626
cp Info.plist dist/MacVimSwitch.app/Contents/
27+
if [ -f "AppIcon.icns" ]; then
28+
cp AppIcon.icns dist/MacVimSwitch.app/Contents/Resources/
29+
echo "已复制应用图标到资源文件夹"
30+
else
31+
echo "警告:未找到 AppIcon.icns 文件,将使用默认图标"
32+
fi
2733
2834
# 构建 ARM64 版本
2935
echo "构建 ARM64 版本..."
@@ -92,6 +98,8 @@ jobs:
9298
<string>APPL</string>
9399
<key>CFBundleShortVersionString</key>
94100
<string>${GITHUB_REF#refs/tags/v}</string>
101+
<key>CFBundleVersion</key>
102+
<string>${GITHUB_REF#refs/tags/v}</string>
95103
<key>LSMinimumSystemVersion</key>
96104
<string>11.0</string>
97105
<key>LSUIElement</key>
@@ -106,8 +114,8 @@ jobs:
106114
<string>MacVimSwitch needs to control system events to manage input sources.</string>
107115
<key>NSAppleScriptEnabled</key>
108116
<true/>
109-
<key>LSBackgroundOnly</key>
110-
<false/>
117+
<key>NSAccessibilityUsageDescription</key>
118+
<string>MacVimSwitch needs accessibility access to monitor keyboard events.</string>
111119
</dict>
112120
</plist>
113121
EOL

0 commit comments

Comments
 (0)