From ab27cffd88553401e7e09e2720c9c20c7667e4e9 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Sat, 28 Dec 2024 18:13:19 -0500 Subject: [PATCH] ci: auto bump changed userstyles on pr merge (#1535) --- .../workflows/{generate-format.yml => ci.yml} | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) rename .github/workflows/{generate-format.yml => ci.yml} (72%) diff --git a/.github/workflows/generate-format.yml b/.github/workflows/ci.yml similarity index 72% rename from .github/workflows/generate-format.yml rename to .github/workflows/ci.yml index 0dcb51af..c4f17562 100644 --- a/.github/workflows/generate-format.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Generate Health Files & Format +name: CI on: workflow_dispatch: @@ -9,8 +9,7 @@ env: HAS_USERSTYLES_TOKEN: ${{ secrets.USERSTYLES_TOKEN != '' }} jobs: - generate-health-files-and-format: - name: Generate health files & format + ci: runs-on: ubuntu-latest permissions: # Give the default GITHUB_TOKEN write permission to commit and push the @@ -33,13 +32,24 @@ jobs: with: deno-version: v2.1.3 - - name: Generate health files + - name: Bump changed userstyles + run: | + git diff --name-only HEAD^1 HEAD | grep '^styles/.*catppuccin\.user\.css$' | xargs deno task bump + + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + message: "chore: bump changed userstyles" + default_author: github_actions + push: false + + - name: Update generated files run: deno task generate - name: Commit changes uses: EndBug/add-and-commit@v9 with: - message: "chore: generate health files" + message: "chore: update generated files" default_author: github_actions push: false @@ -49,7 +59,7 @@ jobs: - name: Commit changes uses: EndBug/add-and-commit@v9 with: - message: "style: format code with prettier" + message: "style: format with prettier" default_author: github_actions push: false