Skip to content

Commit f9a2654

Browse files
committed
[新增GitHub Actions工作流用于图标自动化生成]:添加图标自动生成工作流及初始图标资源
- **新增GitHub Actions工作流**:创建icon_maker.yml工作流,用于在macOS环境下自动生成icns图标文件 - **添加图标源文件**:新增两个PNG格式的图标源文件 - crash-report.png:用于生成崩溃报告图标 - qt-app.png:用于生成Qt应用图标 - **自动化处理流程**:工作流会在icon-maker目录下的PNG文件发生变化时触发,自动完成以下操作: - 设置Python 3.13环境 - 安装依赖包 - 调用make_icns.py脚本生成icns格式图标 - 上传生成的图标文件作为工件
1 parent 53c29bb commit f9a2654

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

.github/workflows/icon_maker.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Icon Maker
2+
3+
on:
4+
push:
5+
paths:
6+
- 'icon-maker/**'
7+
pull_request:
8+
paths:
9+
- 'icon-maker/**'
10+
11+
jobs:
12+
build:
13+
name:
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 icon-maker/*.png; do
35+
python3 icon-maker/make_icns.py "$img"
36+
done
37+
38+
deactivate
39+
40+
ls -lh icon-maker/*.icns
41+
42+
- name: Upload icons files
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: icons-files
46+
path: icon-maker/*.icns
47+

icon-maker/crash-report.png

103 KB
Loading

icon-maker/qt-app.png

158 KB
Loading

0 commit comments

Comments
 (0)