chore(deps): update voidzero-dev/setup-vp action to v1.5.0 (#154) #156
This file contains hidden or 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: Update Rolldown Stats | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| permissions: {} | |
| jobs: | |
| update-stats: | |
| permissions: | |
| contents: write | |
| packages: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup vp | |
| uses: voidzero-dev/setup-vp@e34774bccb4e7d7f2e23514ca980177a71425e43 # v1.5.0 | |
| with: | |
| cache: true | |
| - name: Run rolldown stats collection | |
| run: vp run generate | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: Format data | |
| run: vp check --fix | |
| - name: Check for changes | |
| id: git-check | |
| run: | | |
| if git diff --exit-code data/rolldown-version-stats.json; then | |
| echo "No changes detected in rolldown-version-stats.json" | |
| echo "changes=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "Changes detected in rolldown-version-stats.json" | |
| echo "changes=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Commit and push changes | |
| if: steps.git-check.outputs.changes == 'true' | |
| run: | | |
| git config --local user.email "1430279+Boshen@users.noreply.github.com" | |
| git config --local user.name "Boshen" | |
| git add data/rolldown-version-stats.json | |
| git commit -m "chore: update rolldown version stats" | |
| git push origin main | |
| - name: No changes to commit | |
| if: steps.git-check.outputs.changes != 'true' | |
| run: echo "No changes to commit" |