Skip to content

Merge pull request #662 from Turbo87/node-versions #1640

Merge pull request #662 from Turbo87/node-versions

Merge pull request #662 from Turbo87/node-versions #1640

Workflow file for this run

name: CI
on:
push:
branches:
- main
- master
- "v*"
tags:
- "v*"
pull_request: {}
env:
FORCE_COLOR: 1
# renovate: datasource=npm depName=pnpm
PNPM_VERSION: 9.15.3
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: 22.x
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: ${{ env.PNPM_VERSION }}
run_install: true
- run: yarn lint
tests:
strategy:
matrix:
node-version: [20.x, 22.x]
name: Tests (Node.js ${{ matrix.node-version }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: ${{ env.PNPM_VERSION }}
run_install: true
- run: yarn test --coverage
release:
name: Release
runs-on: ubuntu-latest
needs:
- lint
- tests
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: 22.x
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: ${{ env.PNPM_VERSION }}
run_install: true
- run: npx auto-dist-tag@1 --write
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}