Skip to content

Commit b10dba0

Browse files
authored
ci: add palette sync workflow (#105)
changes in assets/* are caused by regenerating them with a newer matplotlib version
1 parent f02a324 commit b10dba0

36 files changed

+93
-40
lines changed

β€Ž.github/workflows/lint.yamlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
python-version: ${{ matrix.python-version }}
2020
- uses: astral-sh/setup-uv@v5
2121
with:
22-
version: 0.6.3
22+
version: "0.6.3"
2323
python-version: ${{ matrix.python-version }}
2424
enable-cache: true
2525
cache-dependency-glob: "uv.lock"
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Palette
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
workflow_dispatch:
8+
schedule:
9+
- cron: "0 0 * * *" # Run every day at midnight UTC
10+
11+
jobs:
12+
createPullRequest:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: astral-sh/setup-uv@v5
17+
with:
18+
version: "0.6.3"
19+
python-version: "3.13"
20+
enable-cache: true
21+
cache-dependency-glob: "uv.lock"
22+
23+
- name: Fetch latest palette
24+
run: curl -Lo src/palette.json 'https://raw.githubusercontent.com/catppuccin/palette/main/palette.json'
25+
26+
- name: Run codegen
27+
run: uv run --extra matplotlib build.py
28+
29+
- name: Create Pull Request
30+
uses: peter-evans/create-pull-request@v7
31+
with:
32+
commit-message: "feat: auto-sync upstream palettes"
33+
committer: "GitHub <[email protected]>"
34+
author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
35+
signoff: false
36+
branch: new-palettes
37+
delete-branch: true
38+
title: "feat: auto-sync upstream palettes"
39+
body: |
40+
Auto-update `src/palette.json` based on https://github.com/catppuccin/palette/blob/main/palette.json

β€Ž.github/workflows/release-please.yamlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
python-version-file: "pyproject.toml"
3535
- uses: astral-sh/setup-uv@v5
3636
with:
37-
version: 0.6.3
37+
version: "0.6.3"
3838
enable-cache: true
3939
cache-dependency-glob: "uv.lock"
4040
- run: uv build

β€Ž.github/workflows/test.yamlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
python-version: ${{ matrix.python-version }}
2222
- uses: astral-sh/setup-uv@v5
2323
with:
24-
version: 0.6.3
24+
version: "0.6.3"
2525
python-version: "${{ matrix.python-version }}"
2626
enable-cache: true
2727
cache-dependency-glob: "uv.lock"

β€Žassets/frappe/bar.pngβ€Ž

-732 Bytes
Loading

β€Žassets/frappe/boxplot.pngβ€Ž

-740 Bytes
Loading

β€Žassets/frappe/imshow.pngβ€Ž

-728 Bytes
Loading

β€Žassets/frappe/palette.pngβ€Ž

-15.2 KB
Loading

β€Žassets/frappe/patches.pngβ€Ž

-3.95 KB
Loading

β€Žassets/frappe/plot.pngβ€Ž

-5 KB
Loading

0 commit comments

Comments
Β (0)