mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 02:55:38 +08:00
fix: oxipng for ResourceUpdater
This commit is contained in:
27
.github/workflows/res-update-game.yml
vendored
27
.github/workflows/res-update-game.yml
vendored
@@ -223,7 +223,32 @@ jobs:
|
||||
Write-Output "contains_png=$hasPng" >> $env:GITHUB_OUTPUT
|
||||
Write-Output "changes=$changes" >> $env:GITHUB_OUTPUT
|
||||
|
||||
- name: Optimize Templates
|
||||
- name: Setup python
|
||||
if: steps.check_sorted_templates.outputs.contains_png == 'True'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Cache Python packages
|
||||
if: always() && steps.check_sorted_templates.outputs.contains_png == 'True'
|
||||
id: cache_python
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.pythonLocation }}/lib/python3.11/site-packages
|
||||
key: ${{ runner.os }}-pip-optimize-templates-${{ hashFiles('./tools/OptimizeTemplates/requirements.txt') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.check_sorted_templates.outputs.contains_png == 'True' && steps.cache_python.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
pip install -r tools/OptimizeTemplates/requirements.txt
|
||||
|
||||
- name: Setup oxipng
|
||||
if: steps.check_sorted_templates.outputs.contains_png == 'True'
|
||||
uses: baptiste0928/cargo-install@v3
|
||||
with:
|
||||
crate: oxipng
|
||||
|
||||
- name: Run optimize_templates
|
||||
if: steps.check_sorted_templates.outputs.contains_png == 'True'
|
||||
run: |
|
||||
python3 tools/OptimizeTemplates/optimize_templates.py resource/template/items/ resource/template/infrast/
|
||||
|
||||
Reference in New Issue
Block a user