Update dependency eslint to v9 #714
This file contains 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: | |
push: | |
branches: [main] | |
tags: ["*"] | |
pull_request: | |
branches: [main] | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: ["18", "20", "22"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: npm | |
- name: Update to latest npm | |
run: npm install -g npm@latest | |
- name: Install dependencies | |
run: npm ci --include=dev | |
- name: Lint with ESLint | |
run: npm run lint | |
publish: | |
name: Publish | |
needs: lint | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: npm | |
registry-url: "https://registry.npmjs.org" | |
- name: Update to latest npm | |
run: npm install -g npm@latest | |
- name: Publish package | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |