[CI]: 添加生成ICNS图标的GitHub Actions工作流 #1
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: Make ICNS | |
| on: | |
| push: | |
| paths: | |
| - 'icns/**' | |
| pull_request: | |
| paths: | |
| - 'icns/**' | |
| jobs: | |
| build: | |
| name: Make ICNS | |
| 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 icns/*; do | |
| python3 image-toolkit/make_icns.py "$img" | |
| done | |
| deactivate | |
| ls -lh icns/*.icns | |
| - name: Upload ICNS files | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: icns-files | |
| path: icns/*.icns | |