Skip to content

Commit 58f3cfe

Browse files
author
Nick Ardecky
committed
ci: Fix yaml file for publishing to npm
1 parent 3d08af0 commit 58f3cfe

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
# Name is optional and if present must be used
3+
# in the url path for badges
4+
name: Publish to NPM
5+
6+
# only run when a release has been "published"
7+
on:
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
13+
# publish to npm on release
14+
publish:
15+
name: NPM Publish
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
node-version: [12]
20+
21+
steps:
22+
- uses: actions/checkout@v1
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v1
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
registry-url: https://registry.npmjs.org/
28+
- run: npm install
29+
- run: npm run build
30+
- run: npm publish --access public
31+
env:
32+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)