Skip to content

Commit 6ba7871

Browse files
committed
[CI]: 添加生成ICNS图标的GitHub Actions工作流
- 新增工作流文件:创建 `.github/workflows/make-icns.yml`,定义在 macOS 环境下自动生成 ICNS 图标的工作流 - 触发条件:当 `icns/` 目录内容发生变更时,通过 push 或 pull_request 事件触发工作流 - 处理流程:配置 Python 3.13 环境,使用 `make_icns.py` 脚本处理 icns 目录下的所有图片文件 - 输出结果:将生成的 `.icns` 文件打包为构建产物(artifact)供下载使用 - 资源添加:新增两个源图片文件 `crash-report.png` 和 `qt-app.png` 用于图标生成
1 parent 06e4147 commit 6ba7871

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)