chore(deps): update dependency eslint-plugin-eslint-plugin to v6 #141
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build and compare dist | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: install dependencies | |
run: yarn install --frozen-lockfile | |
- name: rebuild | |
run: yarn build | |
- name: compare dist | |
run: | | |
if [ "$(git diff --ignore-space-at-eol ./dist | wc -l)" -gt "0" ]; then | |
echo "dist is not up to date" | |
git diff | |
echo "EXIT_CODE=1" >> $GITHUB_ENV | |
else | |
echo "EXIT_CODE=0" >> $GITHUB_ENV | |
fi | |
id: diff | |
- name: commit dist if changed | |
if: env.EXIT_CODE == '1' | |
run: | | |
git config --global user.name "action-user" | |
git config --global user.email "[email protected]" | |
git add ./dist | |
git commit -m "chore: update dist" | |
git push |