feat(plugin): add test.demo v1.0.0 (#4) #2
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: build-registry | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "plugins/**" | |
| - "scripts/build-registry.mjs" | |
| concurrency: | |
| group: build-registry | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| # 生成 registry.json(updateUrl 指向中央 raw) | |
| - run: REPO_RAW=https://raw.githubusercontent.com/${{ github.repository }}/main node scripts/build-registry.mjs | |
| # 回提 registry.json;它不在 plugins/ 下,不会再次触发本工作流 | |
| - run: | | |
| git config user.name 'github-actions[bot]' | |
| git config user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add registry.json | |
| git diff --cached --quiet || git commit -m 'chore: 重建 registry.json' | |
| git push |