Skip to content

Merge pull request #170 from titoBouzout/patch-2 #351

Merge pull request #170 from titoBouzout/patch-2

Merge pull request #170 from titoBouzout/patch-2 #351

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize]
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
id-token: write
strategy:
matrix:
node: ["18", "20", "22"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Install node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "pnpm"
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Cache turbo setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Run CI with turbo
run: pnpm run ci
- name: Publish to npm if needed
if: github.ref == 'refs/heads/main' && matrix.node == '22'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish -r --no-git-checks