-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 882 Bytes
/
Copy pathmain.yml
File metadata and controls
35 lines (33 loc) · 882 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
34
35
name: publish
on:
workflow_dispatch:
push:
tags:
- 'v?[0-9]+.[0-9]+.[0-9]+*'
permissions:
id-token: write # Required for OIDC and provenance (npm publish)
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
# Ensure npm 11.5.1 or later is installed (for trusted publishing)
- name: Update NPM
run: npm install -g npm@latest
- name: Lint & Tests
run: |
npm ci
npm run lint
npm run test:ci
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "./test-report-lcov.info"
- name: Publish
run: npm publish