-
Notifications
You must be signed in to change notification settings - Fork 6
39 lines (35 loc) · 1 KB
/
icons-optimize.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
on:
# This workflow will be laucnhed manually and will trigger a new commit
# on the branc that is specified.
workflow_dispatch:
name: Optimize SVGs on ui-icons
jobs:
optimize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r .github/helpers/ui-icons/requirements.txt
- run: |
for icon in ui-icons/icons/*; do
echo "::group::Optimizing $icon"
picosvg $icon --output_file $icon
echo "::endgroup::"
done
- uses: actions/setup-node@v4
with:
node-version: 18
- run: |
cd ui-icons
npm install
npm run svgo
- uses: EndBug/add-and-commit@v9
with:
add: 'ui-icons/icons'
message: 'Optimize SVGs'
author_email: [email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}