Skip to content

Commit ef17a9d

Browse files
add publish workflow
1 parent e5ef078 commit ef17a9d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/publish.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish to NPM
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/setup-node@v3
13+
with:
14+
node-version: '18.x'
15+
- run: npm ci
16+
- run: npm run build --if-present
17+
- name: Publish to NPM
18+
env:
19+
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
20+
run: |
21+
echo "//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN}" > .npmrc
22+
npm publish --access public

0 commit comments

Comments
 (0)