Skip to content

build(deps-dev): bump typescript-eslint from 8.4.0 to 8.7.0 #43

build(deps-dev): bump typescript-eslint from 8.4.0 to 8.7.0

build(deps-dev): bump typescript-eslint from 8.4.0 to 8.7.0 #43

name: CI
on:
release:
types: [created]
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm test
build-and-publish:
needs: test
if: github.event_name == 'release' && github.event.release.tag_name
permissions:
contents: read
id-token: write
name: Build and publish to npm registry
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build package
run: pnpm run build
- name: Set package version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "Setting package version to $VERSION"
npm version $VERSION --no-git-tag-version --allow-same-version
- name: Publish to npm
run: npm publish --provenance --tag ${{ contains(github.ref, '-beta') && 'beta' || 'latest' }}
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}