feat: add support for soul studio #35
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: Contributors | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| jobs: | |
| contributors: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Add missing contributors and generate | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PRIVATE_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| for user in $(gh api repos/${{ github.repository }}/contributors -q '.[].login'); do | |
| if ! grep -q "\"login\": \"$user\"" .all-contributorsrc 2>/dev/null; then | |
| npx all-contributors-cli add "$user" code | |
| fi | |
| done | |
| npx all-contributors-cli generate | |
| - name: Commit and push | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add README.md .all-contributorsrc | |
| git diff --staged --quiet && echo "No changes" || (git commit -m "chore: update contributors" && git push) |