From bb5c4d52f38afdd440d36c6fd5fb684da8bf152c Mon Sep 17 00:00:00 2001 From: Joe Bell <7349341+joe-bell@users.noreply.github.com> Date: Sat, 28 Sep 2024 18:36:16 +0300 Subject: [PATCH] chore: add sponsors ci --- .github/workflows/scheduled.yml | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/scheduled.yml diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml new file mode 100644 index 0000000..ca71387 --- /dev/null +++ b/.github/workflows/scheduled.yml @@ -0,0 +1,47 @@ +name: scheduled + +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * *" + push: + branches: [main] + +jobs: + sponsors: + runs-on: ubuntu-latest + steps: + - uses: pnpm/action-setup@v3 + with: + run_install: false + + - uses: actions/setup-node@v4 + with: + cache: "pnpm" + node-version-file: ".nvmrc" + + - name: Preinstallation steps + shell: bash + run: corepack enable + + - name: Install dependencies + shell: bash + run: pnpm i --frozen-lockfile + + - name: Update sponsors + run: pnpm sponsors + env: + SPONSORKIT_GITHUB_TOKEN: ${{ secrets.SPONSORKIT_GITHUB_TOKEN }} + SPONSORKIT_GITHUB_LOGIN: joe-bell + SPONSORKIT_POLAR_TOKEN: ${{ secrets.SPONSORKIT_POLAR_TOKEN }} + SPONSORKIT_POLAR_ORGANIZATION: cva + + - name: Commit + uses: EndBug/add-and-commit@v9 + with: + author_name: GitHub Actions + author_email: 41898282+github-actions[bot]@users.noreply.github.com + message: "chore: update sponsors.svg [ci skip]" + add: ".github/static/sponsorkit/sponsors.*" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}