Skip to content

Commit a3dbe31

Browse files
committed
add npm publish on git tag
1 parent 3fa47b6 commit a3dbe31

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish to NPM
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # This will run the workflow when you push a tag with a version format, like v1.0.0
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: volta-cli/action@v1
15+
- run: npm ci --no-audit
16+
- run: npm run lint --if-present
17+
- run: npm test
18+
- run: npm run build --if-present
19+
env:
20+
CI: true
21+
- name: Publish to NPM
22+
run: npm publish
23+
env:
24+
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTOMATION_TOKEN}}

0 commit comments

Comments
 (0)