-
Notifications
You must be signed in to change notification settings - Fork 19
33 lines (31 loc) · 846 Bytes
/
Copy pathci.yml
File metadata and controls
33 lines (31 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Tests # mainly for the status badge
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
node-version: [lts/*, latest]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
publish-npm:
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: lts/*
registry-url: https://registry.npmjs.org/
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}