Skip to content

Update Node.js to v20.13.0 - autoclosed #320

Update Node.js to v20.13.0 - autoclosed

Update Node.js to v20.13.0 - autoclosed #320

Workflow file for this run

name: Node.js CI
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
CI: 'true'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
node-version: [16, 18, 20]
name: Build & Test (Node v${{ matrix.node-version }})
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Cache browsers
id: browser_cache
uses: actions/cache@v3
with:
path: '~/.cache/ms-playwright'
key: chromium-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- run: pnpm install --frozen-lockfile
- run: pnpx playwright install
if: steps.browser_cache.outputs.cache-hit != 'true'
- run: pnpm build
- run: pnpm lint
- run: pnpm test
env:
CHOKIDAR_USEPOLLING: '1'
TSC_WATCHFILE: 'DynamicPriorityPolling'
release:
needs: [build]
# prevents this action from running on forks
if: github.repository == 'jgoz/esbuild-plugins' && github.event_name == 'push'
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: 'package.json'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
- run: pnpm build
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}