Skip to content

Commit 56aefc5

Browse files
authored
feat: Add CI/CD (#46)
1 parent 67a33ef commit 56aefc5

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish NPM Package
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
node-version:
7+
description: Node.js version to use.
8+
required: false
9+
type: choice
10+
options:
11+
- '18'
12+
- '20'
13+
- '22'
14+
- '24'
15+
default: '24'
16+
dry-run:
17+
description: Performs a dry run of the publish.
18+
required: false
19+
type: boolean
20+
default: false
21+
22+
jobs:
23+
publish:
24+
name: Publish NPM Package
25+
uses: WJSoftware/cicd/.github/workflows/[email protected]
26+
secrets: inherit
27+
with:
28+
node-version: ${{ inputs.node-version }}
29+
npm-tag: latest
30+
dry-run: ${{ inputs.dry-run }}

.github/workflows/test-pr.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Test Pull Request
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- **
7+
workflow_dispatch:
8+
inputs:
9+
node-version:
10+
description: Node.js version to use.
11+
required: false
12+
type: choice
13+
options:
14+
- '18'
15+
- '20'
16+
- '22'
17+
- '24'
18+
default: '24'
19+
20+
jobs:
21+
test:
22+
name: Unit Testing
23+
uses: WJSoftware/cicd/.github/workflows/[email protected]
24+
secrets: inherit
25+
with:
26+
pwsh: false
27+
build: false
28+
node-version: ${{ inputs.node-version }}

0 commit comments

Comments
 (0)