tsup/.github/workflows/format.yml
三咲智子 Kevin Deng e8c6079cdf
refactor: lint
eslint --fix by @sxzz/eslint-config

- add `node:` protocol
- sort imports
- ...
2024-07-17 23:46:22 +08:00

38 lines
812 B
YAML

name: Fix
on:
push:
branches-ignore:
- main
- dev
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
name: Install pnpm
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- run: pnpm i
- name: Format
run: pnpm run format
- name: Commit files and push
continue-on-error: true
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' }}
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add --all
git commit -m "chore(ci): [bot] format code"
git push