Skip to content

Commit 40704ef

Browse files
committed
CI/CD is added for automation
1 parent 566a73d commit 40704ef

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'package.json'
9+
- 'node.js'
10+
- 'README.md'
11+
- '.github/workflows/publish.yml'
12+
13+
jobs:
14+
publish:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '20'
24+
registry-url: 'https://registry.npmjs.org/'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Publish to npm
30+
run: npm publish --access public
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)