Skip to content

[bot] Run grit migration: JavaScript to TypeScript #2

[bot] Run grit migration: JavaScript to TypeScript

[bot] Run grit migration: JavaScript to TypeScript #2

Workflow file for this run

name: CI
on:
push:
branches:
- main
- renovate/**
pull_request:
permissions: {}
jobs:
tests:
name: Unit tests
runs-on: ubuntu-latest
if: "!startsWith(github.head_ref, 'renovate/')"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Unit tests
run: pnpm test -- --coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
lint:
name: Lint
runs-on: ubuntu-latest
if: "!startsWith(github.head_ref, 'renovate/')"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
release:
needs: [tests, lint]
if: github.ref == 'refs/heads/main'
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Release
run: pnpm dlx semantic-release --branches main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}