name: Preview Release

on: [push, pull_request]

jobs:
  preview_release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 'lts/*'
          cache: 'pnpm'
      - run: pnpm install
      - run: pnpm run build
      - run: pnpm dlx pkg-pr-new publish './dist' --compact --template './examples/*'
