Skip to content

5.0.0

5.0.0 #66

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@v4
- uses: actions/setup-node@v4
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@v4
with:
if-no-files-found: error
name: package
path: codeyourfuture-eslint-config-standard-*.tgz
test-eslintrc:
runs-on: ubuntu-22.04
needs: build
strategy:
matrix:
eslint: [8.27, 8, 9]
node: [16, 18, 20]
exclude:
# ESLint v9 requires Node ^18.18.0 || ^20.9.0 || >=21.1.0
- eslint: 9
node: 16
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: ${{ matrix.node }}
- uses: actions/download-artifact@v4
with:
name: package
- run: npm ci
- run: npm run test:install
env:
ESLINT_USE_FLAT_CONFIG: 'false'
ESLINT_VERSION: ${{ matrix.eslint }}
PACK: 'false'
test-flat-config:
runs-on: ubuntu-22.04
needs: build
strategy:
matrix:
eslint: [8.27, 8, 9]
node: [16, 18, 20]
exclude:
# ESLint v9 requires Node ^18.18.0 || ^20.9.0 || >=21.1.0
- eslint: 9
node: 16
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: ${{ matrix.node }}
- uses: actions/download-artifact@v4
with:
name: package
- run: npm ci
- run: npm run test:install
env:
ESLINT_USE_FLAT_CONFIG: 'true'
ESLINT_VERSION: ${{ matrix.eslint }}
PACK: 'false'
deploy-github:
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/v')
needs: [test-eslintrc, test-flat-config]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
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: [test-eslintrc, test-flat-config]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
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@v4
with:
name: package
- run: npm publish codeyourfuture-eslint-config-standard-*.tgz