build: migrate from npm to pnpm #418
Workflow file for this run
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: CI | |
| on: pull_request | |
| jobs: | |
| linter: | |
| name: 'lint checks' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: pnpm/action-setup@v4.2.0 | |
| with: | |
| run_install: false | |
| - uses: actions/setup-node@v6.0.0 | |
| with: | |
| node-version-file: 'package.json' | |
| cache: 'pnpm' | |
| - name: 'Install dependencies' | |
| run: pnpm ci | |
| - name: 'Run type checking' | |
| run: pnpm type-check | |
| - name: 'Run linter' | |
| run: pnpm lint | |
| - name: 'Build userscripts' | |
| run: pnpm build | |
| auto-merge: | |
| name: 'dependabot-auto-merge' | |
| needs: linter | |
| if: github.actor == 'dependabot[bot]' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: automerge | |
| uses: actions/github-script@v8.0.0 | |
| with: | |
| script: | | |
| github.rest.pullRequests.createReview({ | |
| owner: context.payload.repository.owner.login, | |
| repo: context.payload.repository.name, | |
| pull_number: context.payload.pull_request.number, | |
| event: 'APPROVE' | |
| }) | |
| github.rest.pullRequests.merge({ | |
| owner: context.payload.repository.owner.login, | |
| repo: context.payload.repository.name, | |
| pull_number: context.payload.pull_request.number | |
| }) | |
| github-token: ${{github.token}} |