Skip to content

Commit 272658b

Browse files
committed
[新增ICNS图标自动生成工作流及资源文件]
- 新增GitHub Actions工作流:创建macOS环境的ICNS自动生成流水线,当icns目录内容发生变更时触发 - 添加图标源文件:引入crash-report.png和qt-app.png两个PNG格式的原始图标资源 - 配置Python环境:工作流中设置Python 3.13虚拟环境并安装项目依赖 - 实现自动化处理:通过make_icns.py脚本批量处理icns目录下的所有PNG图像文件 - 添加产物输出:将生成的ICNS文件打包为可下载的工作流artifact - 优化执行效率:配置浅层检出(fetch-depth: 1)以加速仓库克隆过程
1 parent f596f9e commit 272658b

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

.github/workflows/make-icns.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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: Create and activate virtual environment, install dependencies, and generate 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"
36+
done
37+
38+
deactivate
39+
40+
ls -lh icns/*.icns
41+
42+
- name: Upload ICNS files
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: icns-files
46+
path: icns/*.icns
47+

icns/crash-report.png

103 KB
Loading

icns/qt-app.png

158 KB
Loading

0 commit comments

Comments
 (0)