Skip to content

Commit 4edc667

Browse files
committed
cd: Publish to NPM on tag
1 parent caefa13 commit 4edc667

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/pipeline.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,18 @@ jobs:
3030
node-version: ${{ matrix.node-version }}
3131
- run: npm ci
3232
- run: npm audit
33+
publish:
34+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
35+
needs: [test, audit]
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v2
39+
- name: Setup Node.js ${{ matrix.node-version }}
40+
uses: actions/setup-node@v1
41+
with:
42+
node-version: 12
43+
registry-url: https://registry.npmjs.org/
44+
- run: npm ci
45+
- run: npm publish --access public
46+
env:
47+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)