Skip to content

Commit 55354cf

Browse files
committed
[添加ICNS图标自动化生成工作流]
- 新增GitHub Actions工作流:创建macOS环境下的ICNS图标自动化生成流程,当icns目录内容发生变更时触发 - 支持图标处理功能:通过Python脚本实现PNG到ICNS格式转换,包含iconutil引擎支持及图标集反向生成验证 - 配置自动化检查流程:包含依赖安装、图标处理、格式验证和目录结构输出完整流水线 - 添加资源文件:引入crash-report.png和qt-app.png两个原始图标文件作为处理源 - 添加产物收集:自动打包生成后的ICNS文件作为工作流产出物
1 parent d217de3 commit 55354cf

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

.github/workflows/make-icns.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Make ICNS
2+
3+
on:
4+
push:
5+
paths:
6+
- 'icns/**'
7+
pull_request:
8+
paths:
9+
- 'icns/**'
10+
11+
jobs:
12+
build:
13+
name: Make ICNS
14+
runs-on: macos-latest
15+
16+
steps:
17+
- uses: actions/checkout@v5
18+
with:
19+
fetch-depth: 1
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v6
23+
with:
24+
python-version: '3.13'
25+
26+
- name: Set up environment and process icons
27+
shell: bash
28+
run: |
29+
source activate_venv.sh
30+
31+
python3 -m pip install --upgrade pip
32+
pip install -e .
33+
34+
for img in icns/*; do
35+
python3 image-toolkit/make_icns.py "$img" --engine iconutil
36+
done
37+
38+
for icns in icns/*.icns; do
39+
base=$(basename "$icns" .icns)
40+
iconutil -c iconset "$icns" -o "icns/${base}.iconset"
41+
python3 image-toolkit/dump_icns.py "$icns" -s
42+
done
43+
44+
python3 tree/tree.py icns -r -f
45+
46+
deactivate
47+
48+
- name: Upload ICNS files
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: icns-files
52+
path: icns/*.icns
53+

icns/crash-report.png

103 KB
Loading

icns/qt-app.png

158 KB
Loading

0 commit comments

Comments
 (0)