Skip to content

feat(contributors): add contributor graphs #40

feat(contributors): add contributor graphs

feat(contributors): add contributor graphs #40

Workflow file for this run

---
name: Scheduler
on:
pull_request:
branches:
- master
types:
- opened
- reopened
- synchronize
push:
branches:
- master
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update-sponsors:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout dist
uses: actions/checkout@v4
with:
ref: dist
path: dist
- name: Set node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm install
- name: Setup env
run: |
# sponsors
echo "CONTRIBKIT_GITHUB_TOKEN=${{ secrets.GH_BOT_TOKEN }}" >> ./configs/sponsors/.env
echo "CONTRIBKIT_GITHUB_LOGIN=${{ github.repository_owner }}" >> ./configs/sponsors/.env
echo "CONTRIBKIT_PATREON_TOKEN=${{ secrets.PATREON_CREATOR_TOKEN }}" >> ./configs/sponsors/.env
# crowdin contributors
echo "CONTRIBKIT_CROWDIN_TOKEN=${{ secrets.CROWDIN_TOKEN }}" >> ./configs/crowdin/.env
# github contributors
echo "CONTRIBKIT_GITHUB_CONTRIBUTORS_TOKEN=${{ secrets.GH_BOT_TOKEN }}" >> ./configs/github/.env
echo "CONTRIBKIT_GITHUB_CONTRIBUTORS_LOGIN=${{ github.repository_owner }}" >> ./configs/github/.env
- name: Setup dist
run: |
# empty dist directory
rm -rf dist/*
# setup .gitignore
echo ".cache.json" >> dist/.gitignore
- name: Update sponsors
shell: bash
run: npm run build
env:
CONTRIBKIT_CROWDIN_PROJECT_ID: 606145
CONTRIBKIT_GITHUB_TYPE: organization
- name: Upload artifacts
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: sponsors
path: dist
if-no-files-found: 'error'
- name: Commit
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
uses: actions-js/push@v1.5
with:
github_token: ${{ secrets.GH_BOT_TOKEN }}
author_email: ${{ secrets.GH_BOT_EMAIL }}
author_name: ${{ secrets.GH_BOT_NAME }}
branch: dist
directory: dist
force: false
message: "chore: update sponsors"