Skip to content

Migrate deprecated rules #51

Migrate deprecated rules

Migrate deprecated rules #51

Workflow file for this run

name: Node.js CI
on:
push:
branches: [main]
tags: [v*]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: '18'
- run: npm ci
- run: npm run lint
- run: npm run test:examples
- run: npm pack
- uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: package
path: codeyourfuture-eslint-config-standard-*.tgz
install:
runs-on: ubuntu-22.04
needs: build
strategy:
fail-fast: false
matrix:
eslint: [6, 7, 8]
node: [16, 18, 20]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: ${{ matrix.node }}
- uses: actions/download-artifact@v3
with:
name: package
- run: npm ci
- run: npm run test:install
env:
ESLINT_VERSION: ${{ matrix.eslint }}
PACK: 'false'
deploy-github:
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/v')
needs: install
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: package
- run: |
gh release create \
'${{ github.ref_name }}' \
--title '${{ github.ref_name }}' \
codeyourfuture-eslint-config-standard-*.tgz
env:
GH_TOKEN: ${{ github.token }}
deploy-npm:
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/v')
needs: install
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_AUTH_TOKEN}"
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- uses: actions/download-artifact@v3
with:
name: package
- run: npm publish codeyourfuture-eslint-config-standard-*.tgz