Skip to content

Commit 7f3e8f7

Browse files
committed
Adding GitHub Action for publishing NPM packages
1 parent f59bfca commit 7f3e8f7

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/npm-publish.yml

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

0 commit comments

Comments
 (0)