Skip to content

chore(main): release 2.2.2 #95

chore(main): release 2.2.2

chore(main): release 2.2.2 #95

Workflow file for this run

name: Build
on:
release:
types: [published]
workflow_dispatch:
push:
pull_request:
jobs:
test:
strategy:
matrix:
node-version: [latest, 18, 20, 22]
os: [ubuntu-latest, windows-latest, macos-latest]
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: Test
run: pnpm test
- 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
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 --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: published-assets
path: lib