Revert "Version Packages" #20
Workflow file for this run
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: Sort package.json | |
on: | |
push: | |
paths: | |
- '**/package.json' | |
jobs: | |
sort-package-json: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: ./.github/actions/setup/pnpm | |
- name: Sort package.json | |
run: pnpm run sort:package | |
- name: Check for changes | |
run: | | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "Changes detected" | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "chore: sorted package.json" | |
git push | |
else | |
echo "No changes detected" | |
fi |