Skip to content

Commit 55d7b18

Browse files
authored
Github Action to publish to NPM (#34)
* Workflow to publish to NPM * Tweak some workflow settings
1 parent 94dffab commit 55d7b18

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow will run tests using node and then publish a package to NPM
2+
3+
name: Node.js Package
4+
5+
on:
6+
workflow_dispatch
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: 12
16+
- run: npm install
17+
- run: npm run test
18+
19+
publish-npm:
20+
needs: build
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: actions/setup-node@v1
25+
with:
26+
node-version: 12
27+
registry-url: https://registry.npmjs.org/
28+
- run: npm publish
29+
env:
30+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 commit comments

Comments
 (0)