Skip to content

chore(deps-dev): bump @types/node from 22.9.0 to 22.9.1 (#18) #60

chore(deps-dev): bump @types/node from 22.9.0 to 22.9.1 (#18)

chore(deps-dev): bump @types/node from 22.9.0 to 22.9.1 (#18) #60

Workflow file for this run

name: Build
on:
release:
types: [published]
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
node-version: [latest, 18, 20, 22]
os: [ubuntu-latest, windows-latest, macos-latest]
permissions:
# Required to checkout the code
contents: read
# Required to put a comment into the pull-request
pull-requests: write
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Install Puppeteer Chrome
run: pnpm puppeteer browsers install chrome
- name: Lint check
run: pnpm run lint-check
- name: Format check
run: pnpm run format-check
- name: Run tests
run: pnpm run coverage
- name: Report Coverage
if: matrix.os == 'ubuntu-latest' && matrix.node-version == 'latest' && github.event_name == 'pull_request'
uses: davelosert/vitest-coverage-report-action@v2
- name: Build
run: pnpm run build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: test-assets-${{ matrix.os }}-${{ matrix.node-version }}
path: lib
publish:
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest
needs: test
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
node-version: lts/*
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- run: pnpm publish --provenance --no-git-checks --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: published-assets
path: lib