Skip to content

chore: update tsconfig.json #542

chore: update tsconfig.json

chore: update tsconfig.json #542

Workflow file for this run

name: Node.js CI
on: [push, pull_request]
jobs:
test:
name: "Test on Node:${{ matrix.node-version }} OS:${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16, 18, 20]
os: [ubuntu-latest]
include:
- os: windows-latest
node-version: 18
steps:
- uses: actions/checkout@v3
- name: setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
id: yarn-cache
with:
path: "node_modules"
key: ${{ runner.os }}-node-v${{ matrix.node-version }}-yarn-${{ hashFiles('yarn.lock') }}
- run: yarn --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
- run: yarn lint
if: matrix.os != 'windows-latest'
- run: yarn typecheck
- run: yarn test
release:
runs-on: ubuntu-latest
needs: test
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
- uses: actions/cache@v2
id: yarn-cache
with:
path: "node_modules"
key: ${{ runner.os }}-node-v18-yarn-${{ hashFiles('yarn.lock') }}
- run: yarn --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
- run: yarn build
- run: |
VERSION="$(node -e 'console.log(process.argv[1].match(/^refs\/tags\/v(\d+\.\d+\.\d+)$/)[1])' "${{ github.ref }}")"
node -e 'console.log(JSON.stringify({...require("./package.json"),version:process.argv[1]}, null, 2))' "$VERSION" | tee ./tmp-package.json
mv ./tmp-package.json ./package.json
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}