chore(deps): lock file maintenance #717
Workflow file for this run
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: Unit tests & Release | |
on: | |
push: | |
branches: | |
- main | |
- next | |
pull_request: | |
branches: | |
- main | |
- next | |
jobs: | |
test-node: | |
name: Test on Node.js v${{ matrix.node-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [14.x, 16.x, 18.x, 19.x, 20.x, 22.x] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: yarn | |
- name: install | |
run: yarn | |
- name: run tests | |
run: yarn test --colors | |
test-os: | |
name: Test on ${{ matrix.os }} using Node.js LTS | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, macOS-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: yarn | |
- name: install | |
run: yarn | |
- name: run tests | |
run: yarn test --colors | |
lint: | |
name: Run ESLint and TypeScript | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: yarn | |
- name: install | |
run: yarn | |
- name: run typecheck | |
run: yarn typecheck | |
- name: run build | |
run: yarn build | |
- name: run ESLint | |
run: yarn lint | |
release: | |
if: | |
# prettier-ignore | |
${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }} | |
name: Release new version | |
needs: [test-node, test-os, lint] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: yarn | |
- name: install | |
run: yarn | |
- run: yarn semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |