Skip to content

Update plugin versions #559

Update plugin versions

Update plugin versions #559

name: Update plugin versions
on:
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:
jobs:
update:
name: Check for new plugin releases
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Update versions
env:
GH_TOKEN: ${{ github.token }}
run: pnpm tsx scripts/update-versions.ts
- name: Commit and push
id: commit
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add plugins.json
git diff --cached --quiet && echo "changed=false" >> "$GITHUB_OUTPUT" && exit 0
git commit -m "Update plugin versions"
git push
echo "changed=true" >> "$GITHUB_OUTPUT"
- name: Purge jsDelivr cache
if: steps.commit.outputs.changed == 'true'
uses: gacts/purge-jsdelivr-cache@v1
with:
url: https://cdn.jsdelivr.net/gh/NuclearPlayer/plugin-registry@master/plugins.json