[新增GitHub Actions工作流用于图标自动化生成]:添加图标自动生成工作流及初始图标资源 #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Icon Maker | |
| on: | |
| push: | |
| paths: | |
| - 'icon-maker/**' | |
| pull_request: | |
| paths: | |
| - 'icon-maker/**' | |
| jobs: | |
| build: | |
| name: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Create and activate virtual environment, install dependencies, and generate icons | |
| shell: bash | |
| run: | | |
| source activate_venv.sh | |
| python3 -m pip install --upgrade pip | |
| pip install -e . | |
| for img in icon-maker/*.png; do | |
| python3 icon-maker/make_icns.py "$img" | |
| done | |
| deactivate | |
| ls -lh icon-maker/*.icns | |
| - name: Upload icons files | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: icons-files | |
| path: icon-maker/*.icns | |