Skip to content

Commit 95bb11b

Browse files
committed
add workflow_dispatch
1 parent 1af1ddd commit 95bb11b

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,24 @@ on:
55
- cron: "0 0 * * *"
66
push:
77
branches:
8-
- 'main'
8+
- "main"
99
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
1010
pull_request:
1111
branches:
12-
- 'main'
12+
- "main"
1313

1414
workflow_dispatch:
15-
15+
inputs:
16+
logLevel:
17+
description: "Log level"
18+
required: true
19+
default: "warning"
20+
type: choice
21+
options:
22+
- info
23+
- warning
24+
- debug
25+
1626
jobs:
1727
test:
1828
runs-on: ubuntu-latest
@@ -30,30 +40,26 @@ jobs:
3040
run: npm install
3141
- name: Run tests
3242
run: npm test
33-
43+
3444
build_and_publish:
35-
needs: [ test ]
45+
needs: [test]
3646
runs-on: ubuntu-latest
3747
if: startsWith(github.ref, 'refs/tags')
3848
steps:
3949
- uses: actions/checkout@v4
40-
50+
4151
- uses: actions/setup-node@v4
4252
with:
4353
node-version: 20
4454
registry-url: "https://registry.npmjs.org"
4555

4656
- name: Install dependencies
4757
run: npm install
48-
58+
4959
- name: Build
5060
run: npm run build
51-
61+
5262
- name: Publish
5363
run: npm publish
5464
env:
5565
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_TOKEN }}
56-
57-
58-
59-

0 commit comments

Comments
 (0)