diff --git a/.github/workflows/scheduler.yml b/.github/workflows/scheduler.yml index 8b1bf57..221bc9a 100644 --- a/.github/workflows/scheduler.yml +++ b/.github/workflows/scheduler.yml @@ -61,6 +61,11 @@ jobs: echo "CONTRIBKIT_GITHUB_CONTRIBUTORS_LOGIN=${{ github.repository_owner }}" } >> ./configs/github/.env + # github contributions + { + echo "CONTRIBKIT_GITHUB_CONTRIBUTIONS_TOKEN=${{ secrets.GH_BOT_TOKEN }}" + } >> ./configs/githubContributions/.env + - name: Setup dist run: | # empty dist directory diff --git a/build.sh b/build.sh index f15c083..77509e0 100644 --- a/build.sh +++ b/build.sh @@ -12,6 +12,10 @@ crowdin_projects=( 614257 ) +github_accounts=( + "ReenigneArcher" +) + output_dir="$(pwd)/dist" echo "Building sponsors..." @@ -31,6 +35,15 @@ for repo in "${repos[@]}"; do done popd || exit 1 +echo "Building GitHub contributions..." +pushd configs/githubContributions || exit 1 +for account in "${github_accounts[@]}"; do + echo "Building GitHub contributions for account ${account}..." + export CONTRIBKIT_GITHUB_CONTRIBUTIONS_LOGIN="${account}" + npx contribkit --outputDir="${output_dir}" --name="githubContributions.${account}" --force +done +popd || exit 1 + echo "Building CrowdIn contributors..." pushd configs/crowdin || exit 1 for project in "${crowdin_projects[@]}"; do diff --git a/configs/githubContributions/contribkit.config.ts b/configs/githubContributions/contribkit.config.ts new file mode 100644 index 0000000..8c6a04a --- /dev/null +++ b/configs/githubContributions/contribkit.config.ts @@ -0,0 +1,23 @@ +import { defineConfig, tierPresets } from '@lizardbyte/contribkit' + +export default defineConfig({ + githubContributions: { + login: process.env.CONTRIBKIT_GITHUB_CONTRIBUTIONS_LOGIN, + token: process.env.CONTRIBKIT_GITHUB_CONTRIBUTIONS_TOKEN, + logarithmicScaling: false, + maxContributions: 100, + }, + renderer: 'circles', + width: 1000, + circles: { + radiusMax: 100, + radiusMin: 1, + radiusPast: 1, + }, + tiers: [ + { + title: 'Repo', + preset: tierPresets.base, + }, + ], +})