name: CI / CD on: push: branches: - '**' pull_request: branches: - main jobs: build: name: Test Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 with: version: 10 - uses: actions/setup-node@v4 with: node-version: '24' cache: 'pnpm' - run: pnpm install --frozen-lockfile - run: pnpm build publish: name: Publish to NPM needs: build if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 with: version: 10 - uses: actions/setup-node@v4 with: node-version: '24' registry-url: 'https://registry.npmjs.org' cache: 'pnpm' - run: pnpm install --frozen-lockfile - run: pnpm build - run: pnpm publish --no-git-checks env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}