Skip to content
Merged
51 changes: 51 additions & 0 deletions .github/workflows/ci-verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI - Verify

on:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
strategy:
matrix:
node-version: [20.x, 22.x, 24.x]
steps:
- uses: actions/checkout@v7
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Report Coverage
if: always()
uses: davelosert/vitest-coverage-report-action@v2
with:
threshold-icons: "{0: '🔴', 80: '🟠', 90: '🟢'}"
verify-publish:
runs-on: ubuntu-latest
needs: test
permissions:
contents: write
id-token: write
attestations: write
packages: write
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: "24.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm run build
- name: Generate provenance
uses: actions/attest-build-provenance@v4
with:
subject-path: dist/**
- name: Verify npm publish
run: npm publish --provenance --dry-run || true
27 changes: 0 additions & 27 deletions .github/workflows/ci-vitest.yml

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Publish Package to npmjs

on:
push:
tags:
- "v*"

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -20,10 +22,7 @@ jobs:
- run: npm ci
- run: npm run build
- name: Generate provenance
uses: actions/attest-build-provenance@v1
env:
# actions/attest-build-provenance@v1 uses Node 20
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
uses: actions/attest-build-provenance@v4
with:
subject-path: dist/**
- run: npm publish --provenance --access public
Expand Down
Loading