Skip to content

update project typescript-eslint #113

update project typescript-eslint

update project typescript-eslint #113

Workflow file for this run

name: Build
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- run: yarn install --immutable
- run: yarn lint
- run: yarn prettier --check .
- run: yarn tsc
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --immutable
- run: yarn test
release:
runs-on: ubuntu-latest
needs: [lint, test]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- run: yarn install --immutable
- name: Create release pull request or publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: ./scripts/release.sh
version: ./scripts/version.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}