Skip to content

Commit 2e04b02

Browse files
committed
Add npm publish flow
1 parent 17a4bfd commit 2e04b02

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

.github/workflows/npm-publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish to npm
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
workflow_dispatch:
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v3
13+
- name: Set up Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: '20'
17+
registry-url: 'https://registry.npmjs.org/'
18+
- name: Install dependencies
19+
run: npm ci
20+
- name: Build
21+
run: npm run build
22+
- name: Publish to npm
23+
run: npm publish --access public
24+
env:
25+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

src/tools/alerts.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,9 @@ export const createAlertToolDefinition = {
6767
},
6868
filterValue: {
6969
oneOf: [
70-
{ type: "string" },
71-
{
72-
type: "array",
73-
items: { type: "string" }
74-
},
75-
{ type: "null" }
70+
{ type: 'string' },
71+
{ type: 'array', items: { type: 'string' } },
72+
{ type: 'null' }
7673
],
7774
description: 'Optional filter value. For crashes: array of version strings (e.g. ["22:02:0"]). For rating: array of numbers 1-5. For nps: "detractor"/"passive"/"promoter". For events: string value. Set to null if no filter'
7875
},

0 commit comments

Comments
 (0)