Skip to content

ci(release): publish via Trusted Publisher workflow and streamline CI #366

ci(release): publish via Trusted Publisher workflow and streamline CI

ci(release): publish via Trusted Publisher workflow and streamline CI #366

Workflow file for this run

name: Build and test library
on:
pull_request:
branches: [main, master]
types: [opened, synchronize]
push:
branches: [main, master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x, 24.x]
steps:
- uses: actions/checkout@v7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run linter
run: npm run lint
- name: Run format check
run: npm run format:check
- name: Run build
run: npm run build
- name: Run test with coverage
run: npm run coverage
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
flag-name: run-${{ matrix.node-version }}
finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Close parallel build
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: "run-22.x,run-24.x"